• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Just let me do the talking. Ahem ... so ... you see ... we have this tiny ad...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic