Re: trivial third party jar dependancy



Lew wrote:
Mark Space wrote:
With java -jar, you have to set the Class-Path property. For whatever reason, java -jar ignores any classpath you specify on the command line. This is very counter intuitive to me, but there it is.

There is a rationale for it. JARs are how you package your application to run in a foreign environment (the user's). You have no control over the user's CLASSPATH or if they use the -cp option correctly. To get

For a savvy user, I'd like to see the -cp option used. It's a way of making sure stuff is still accessible when an old .jar assumes a library in one location which have moved to another. It's a long term maintenance issue. For that matter, the CLASSPATH in the environment should work the same way. Environment namespace pollution bugs me, but it's still useful.
.



Relevant Pages

  • Re: Ant java task to start application
    ... >>to do Remote Debugging? ... >>command line is that the classpath is too big to fit and I get line ... One is to put all of the jars you're using into a single ...
    (comp.lang.java.programmer)
  • Re: Question for Java Gurus
    ... its own compiler and doesn't use javac at all. ... the CLASSPATH environment variable from within Eclipse. ... classpath implementations of compilers as a fringe case. ...
    (comp.lang.java.programmer)
  • Re: Question for Java Gurus
    ... its own compiler and doesn't use javac at all. ... the CLASSPATH environment variable from within Eclipse. ... classpath implementations of compilers as a fringe case. ...
    (comp.lang.java.help)
  • Re: Question for Java Gurus
    ... its own compiler and doesn't use javac at all. ... the CLASSPATH environment variable from within Eclipse. ... classpath implementations of compilers as a fringe case. ...
    (comp.lang.java.softwaretools)
  • jsp - jdbc connection to db2v8 failing
    ... ClassNotFoundException for the COM.ibm.db2.jdbc.app.DB2Driver. ... My Environment: ... Classpath but I already included the db2java.zip into the ... public class TestQuery { ...
    (comp.lang.java.databases)