aspose file tools*
The moose likes Java in General and the fly likes seeing classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "seeing classpath" Watch "seeing classpath" New topic
Author

seeing classpath

Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
Is there a way to see what the classpath is set to while something is running? Is there a method to get it?
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
String classpath = System.getProperty("java.class.path");


"JavaRanch, where the deer and the Certified play" - David O'Meara
netharam ram
Ranch Hand

Joined: Aug 09, 2001
Posts: 202
Hi,Cindy is there any method to set the classpath at runtime using any method.Is there any way of running dos commands too,for Runtime.exec()will accept only exe files as parameters
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by netharam ram:
Hi,Cindy is there any method to set the classpath at runtime using any method.
No, except by instantiating new class loaders.
Is there any way of running dos commands too,for Runtime.exec()will accept only exe files as parameters
Runtime.exec() will run DOS commands as well, you just need to run the command interpreter. Your COMSPEC environment variable will give its name; on NT, it's cmd.exe. For example, Runtime.exec("cmd.exe /c dir > \\dir.txt"); will create a directory listing in the "\dir.txt" file.
- Peter
 
jQuery in Action, 2nd edition
 
subject: seeing classpath