• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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: 3064
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.
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic