This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
peter cooke
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Greg Charles
Sheriff
Posts: 2993
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
${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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic