The "java -version" returns the version of the JVM you're using. The "java version" attempts to start a Java application whose class name is version. See the man pages for java for more information.
Michael Repucci (M) 718-288-4554 (W) 212-746-0462 mich...@repucci.org http://michael.repucci.org/ --See life as it is, not as it appears to be. On Thu, May 14, 2009 at 3:48 PM, Dave Filchak <sub...@zuka.net> wrote: > Curious, > > What is the difference between java -version and java version? > > In the first case I get: > > java -version > java version "1.6.0_13" > Java(TM) SE Runtime Environment (build 1.6.0_13-b03) > Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode) > > In the second, I get: > > java version > Exception in thread "main" java.lang.NoClassDefFoundError: version > Caused by: java.lang.ClassNotFoundException: version > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:252) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) > Could not find the main class: version. Program will exit. > > > Dave > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >