• Post Reply Bookmark Topic Watch Topic
  • New Topic

jar files  RSS feed

 
friso dejonge
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I created a jar file (A) with all my code. Then i created another jar file (B) which contained the a readme.txt and other text files. When i look at with winzip at my (B) jar file it contains all the right files.
Now when i extract the (B) jar file it automatically extracts all other jars in there as well which is not what i want it to do.
I cannot find any documentation on this feature.
Is there a way around this ?
my jars are created with
jar cvf server.jar *
and extracted with
jar xvf server.jar
thanks
friso
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this:
jar -xf theBigJar.jar server.jar
Eugene.
 
friso dejonge
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks eugene, that works.
Additional question: is there a way to extract all files automatically (so you dont have to mention them one by one) and it does not unpack the next level jars.
thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!