Results 1 to 4 of 4
Thread: questions about external jars
- 05-31-2011, 04:48 PM #1
Member
- Join Date
- May 2011
- Posts
- 2
- Rep Power
- 0
questions about external jars
Hi,
I am quite new to the interpreted languages, when you add an external jar and you make your project itself a jar will the external jar be embedded? Or do i have to put the external jar in the same place as my jar with a relative path to the external?
I don't know if i am clear, can you help with this please?
ps: i ask this question because i suspect it to be the source of a magic value error, dunno if it can be.
- 05-31-2011, 05:30 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
You have to supply the jar along with your jar.
It doesn't get embedded, and Java can't pull jars that are in jars out anyway.
So your deployment will consist of your jar and all the ones it uses as well.
The MANIFEST in your jar file will provide the relative path to these dependencies.
Normally you'd have something like:
Java Code:distribution directory -> myjar.jar lib -> all the other jars.
- 05-31-2011, 05:31 PM #3
It depends how you create the Jar. Are you doing this from the command line, from an IDE, what? Keep in mind that you can manually view the contents of a jar: Viewing the Contents of a JAR File (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files)
Edit- What Tolls said. Mostly I'm thinking of eclipse's option to extract a required Jar and repackage it into your own.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 05-31-2011, 06:50 PM #4
Member
- Join Date
- May 2011
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Loading service implementations with ServiceLoader from external JARs
By Sethiel in forum Advanced JavaReplies: 0Last Post: 11-03-2010, 02:16 PM -
Communication between two Jars
By Gijava in forum Advanced JavaReplies: 1Last Post: 06-26-2009, 04:59 PM -
More efficient in memory? Multiple Jars or Single Jars with lot's of Classes
By dark_cybernetics in forum New To JavaReplies: 0Last Post: 08-19-2008, 04:44 PM -
Preblem with JARs
By bizmut in forum EclipseReplies: 1Last Post: 06-04-2008, 05:41 PM -
how to find unused jars??
By orchid in forum EclipseReplies: 4Last Post: 06-08-2007, 10:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks