aspose file tools
The moose likes Java in General and the fly likes Accessing a file outside a jar Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Accessing a file outside a jar" Watch "Accessing a file outside a jar" New topic
Author

Accessing a file outside a jar

Cathleen Meneses
Greenhorn

Joined: Mar 16, 2004
Posts: 21
Hi!
I have a jar (say, JarA), that needs to access another jar's (say, jarB) file... I have a small idea that i should include the path of my jarB in the classpath of my manifest.. but it's not working...

Any suggestions or ideas on how i might be able to go about this? any help is greatly appreciated!
Many Thanks!!
Manuel Moons
Ranch Hand

Joined: Mar 05, 2002
Posts: 229
Maybe this link can help you out!

Manifest classpath
Rick O'Shay
Ranch Hand

Joined: Sep 19, 2004
Posts: 531
Originally posted by Cathleen Meneses:
Hi!
I have a jar (say, JarA), that needs to access another jar's (say, jarB) file... I have a small idea that i should include the path of my jarB in the classpath of my manifest.. but it's not working...

Any suggestions or ideas on how i might be able to go about this? any help is greatly appreciated!
Many Thanks!!


You can put 'em both in the -classpath. Manifest is for applets and nested jars.
Manuel Moons
Ranch Hand

Joined: Mar 05, 2002
Posts: 229
Manifest files are not only for applets and nested jars. You can make an executable jar and let it refer to other jars using the "class-path:" manifest entry.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Accessing a file outside a jar
 
Similar Threads
getResource for getting a file located on a different project
EJB start
Package several jars lib in one single jar file
javax.swing.text package
Lazy loading resources inside jars