aspose file tools*
The moose likes Beginning Java and the fly likes help regarding the CLASSPATH Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "help regarding the CLASSPATH " Watch "help regarding the CLASSPATH " New topic
Author

help regarding the CLASSPATH

vijay kolli
Greenhorn

Joined: May 23, 2009
Posts: 10
Can I use the " set CLASSPATH" option even without having a CLASSPATH environment variable?

Thanks,
Vijay.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19781
    
  20

Execute "java -help" and "javac -help" to see all options. One of them can be used for setting the class path.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40027
    
  28
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

Joined: Sep 29, 2008
Posts: 12617

To answer the original question, set CLASSPATH *creates* a classpath variable, whether or not one already existed.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40027
    
  28
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help regarding the CLASSPATH