Err, one is correct and one is not :)
-version does what you expect: gives you information on the JVM that is
executing. Just putting version however is telling the JVM to load a
class named version and execute it, which of course it can't find, hence
the ClassNotFoundException you see.
Frank
--
Frank W. Zammetti
Author of "Practical Ext JS Projects with Gears" (coming soon)
and "Practical Dojo Projects"
and "Practical DWR 2 Projects"
and "Practical JavaScript, DOM Scripting and Ajax Projects"
and "Practical Ajax Projects with Java Technology"
(For info: apress.com/book/search?searchterm=zammetti&act=search)
All you could possibly want is here: zammetti.com
Dave Filchak 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
__________ Information from ESET Smart Security, version of virus
signature database 4076 (20090514) __________
The message was checked by ESET Smart Security.
http://www.eset.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org