Originally posted by Vijay Silva: Is there a reason why the classpath option is ignored?? What if a classpath is not specified in the manifest??
I can think of a reason: it gives the person who made the JAR file total control over the classpath when the JAR is executed.
If java.exe would also look at the CLASSPATH environment variable, you might get into all kinds of problems because the JRE could pick up classes that are anywhere on the system. It could cause a lot of hassle, especially with users who don't know all the internals of Java and who just want to run a Java program they get from somebody, if they have their CLASSPATH (deliberately or not) set wrong.