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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 19541
    
  16

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: 36468
    
  16
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: 36468
    
  16
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.
 
Don't get me started about those stupid light bulbs.
 
subject: help regarding the CLASSPATH
 
Similar Threads
Running application from command mode (MS DOS WINDOW)
how to use ClassLoader ???
Compiling, but not running !!!
Web Application Architecture
class 1