aspose file tools*
The moose likes Java in General and the fly likes How to get the classpath inside a class of an executable jar 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 » Java in General
Bookmark "How to get the classpath inside a class of an executable jar" Watch "How to get the classpath inside a class of an executable jar" New topic
Author

How to get the classpath inside a class of an executable jar

Anirban Chatterjee
Greenhorn

Joined: Feb 06, 2001
Posts: 18
I have an executable jar where I specify the classpath inside the MANIFEST , its runs fine .<br>
I need to get hold of this class-path inside my code (I have to spawn a new process and hand over this classpath to it )<br>
Any idea how I can get hold of this classpath -(apart from the crude method of reading the manifest entry )<br>
Thanks a lot,<br>
Anirban
Jon Strayer
Ranch Hand

Joined: Dec 04, 2002
Posts: 133
How about
System.getProperty("java.class.path")


Jon
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get the classpath inside a class of an executable jar
 
Similar Threads
Problem with packaging using ant
assignment JAR problem
Imbedded jar file
jar
jar files