File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help regarding the CLASSPATH

 
vijay kolli
Greenhorn
Posts: 10
  • 0
  • 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: 20371
44
Chrome Eclipse IDE Java Windows
  • 0
  • 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: 47229
52
  • 0
  • 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
  • 0
  • 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: 47229
52
  • 0
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic