wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 314
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: 2841
    
  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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: eclipse is able to run a standalo java class, command line failes for class path issue
 
Similar Threads
can not deploy application!!!!
Bean definition found but not found
How to have multiple public classes in one file for spring?
another Eclipse & JBoss question
Trouble with running Maven Tomcat plugin through Eclipse