18

Possible Duplicate:
Which JRE I am using

I'm trying to figure out whether the Java installation in my HPC environment is running the Sun JVM, or Oracle, or OpenJDK. Since I don't have administrator access and I didn't install Java, is there a quick way I can determine which JVM I have installed?

standage@login4:~$ which java
/usr/bin/java
standage@login4:~$ java -version
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)
standage@login4:~$ uname
Linux
Community
  • 1
  • 1
Daniel Standage
  • 8,136
  • 19
  • 69
  • 116

1 Answers1

5

There's a java.vendor property from System.getProperties(), that should give you the info that you're looking for.

On my Mac it's:

java.vendor=Apple Inc.
Will Hartung
  • 115,893
  • 19
  • 128
  • 203
  • 1
    nope, this gives "Sun Microsystems Inc." still. https://gist.github.com/3890869 – mike Oct 15 '12 at 04:48
  • 11
    the correct answer is java.vm.name or java.runtime.name. A one-liner that shows all the system properties helps: System.getProperties().list(System.out) – mike Oct 15 '12 at 04:59
  • 2
    /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/java vendor java.vm.name=OpenJDK 64-Bit Server VM – Kanagavelu Sugumar Mar 13 '14 at 05:34