• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help regarding the CLASSPATH

 
vijay kolli
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I use the " set CLASSPATH" option even without having a CLASSPATH environment variable?

Thanks,
Vijay.
 
Rob Spoor
Sheriff
Pie
Posts: 20669
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Execute "java -help" and "javac -help" to see all options. One of them can be used for setting the class path.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50277
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't set a system CLASSPATH unless you have problems accessing your work. Set a CLASSPATH for the application with the -cp or similar options. Look for the details of the "java" and "javac" tools (these are the Windows versions).
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To answer the original question, set CLASSPATH *creates* a classpath variable, whether or not one already existed.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50277
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Presumably, however, if you set the classpath with that instruction at the command line, that classpath variable will only be valid for the lifetime of that command window, and will vanish when the command prompt is closed. That is much safer than setting a system classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic