just unzip the jar you want to use, place it in your .classes directory and make sure you have the right import statements.
should work just fine
stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
i think you have to update your current jar file..
You have to use the following code
jar uf currentfilename.jar updatefilename.jar
just use this command then both jar files can be made as single.
vinod_javas
Practically a Posting Shark
871 posts since Feb 2007
Reputation Points: 119
Solved Threads: 7
nesting jarfiles isn't supported.
There are some proposals to allow for it, but nothing has yet reached prototype stage.
So at current the only way would indeed be to unpack the jars into one folder and repack them as a single archive.
Better (usually) to just add them all separately to your classpath.
It's a very rare case where there is a need to repack jars, usually it's only applicable when deploying packages to an application server where they would interfere with older versions of those same packages that the application server needs internally, a situation rare enough that most people never encounter it (I myself only have seen it once so far in a decade of using Java professionally).
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
JAR files are normal zip files. Use any zipping software like Winrar or Winzip to open them.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
Or jar. jar can not just create jar files, it can also read and extract them.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Just read the "tools" part of your JDK documentation on how to use the jar utility. The form of the command is going to vary with how you want to jar or unjar your files.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
There is no DOS command for unzipping jar files as DOS doesn't have a built-in system for interpreting the file format.
Maybe some DOS program can read and interpret the files (they're just ZIP files after all) but not DOS itself.
And you're certainly not going to run Java on DOS as Java has requirements that DOS never met.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337