GeeCON Prague 2014*
The moose likes IDEs, Version Control and other tools and the fly likes eclipse is able to run a standalo java class, command line failes for class path issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "eclipse is able to run a standalo java class, command line failes for class path issue" Watch "eclipse is able to run a standalo java class, command line failes for class path issue" New topic
Author

eclipse is able to run a standalo java class, command line failes for class path issue

peter cooke
Ranch Hand

Joined: Mar 16, 2004
Posts: 316
I have a runnable java class with main. It runs from eclipse.

I put is the same jvm argument and same classpath that runs in eclipse run configuration, but will not run from command line.
Is there a way to force eclipse to show me what the effective command line being run would be. It is not showing up in the console.

${IV4_ROOT}/pathToMissingProperty/* contains n4_common.properties
${IV4_ROOT}/lib/* contains all the hibernate jars
${IV4_ROOT}/n4build/classes is the directory where ant compiles all the java classes to for the eclipse project.

from the command line executing

>java -classpath ${IV4_ROOT}/pathToMissingProperty/*:${IV4_ROOT}/lib/*:${IV4_ROOT}/n4build/classes: -DAPP_ENCRYPTION_PASSWORD=MYPAS_WORD com.mycompany.EventFixer

gives me



Any thoughts on why I am getting this exception???
Thanks for any help

CIAO Peter M. Cooke
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2853
    
  11

${IV4_ROOT}/pathToMissingProperty/* matches all .jar files in ${IV4_ROOT}/pathToMissingProperty, but not the directory itself. If I'm understanding you right, your property file is directly in that directory, not in a jar file, so the classpath entry should be ${IV4_ROOT}/pathToMissingProperty

Of course, you can put both entries into your classpath if you also have jars in that directory.
 
GeeCON Prague 2014
 
subject: eclipse is able to run a standalo java class, command line failes for class path issue