Questions tagged [unjar]

A synonym for the Ant unzip task

See the official documentation for more.

8 questions
19
votes
4 answers

How do you use ant to unjar multiple JAR files and rebuild them into one JAR file?

I would like to unjar multiple JAR files and then rebuild into one JAR using an ant build script. Is this possible?
shelt536
  • 271
  • 2
  • 3
  • 5
5
votes
6 answers

How to delete a specific File/Folder from a jar pragmatically in java

How to delete a specific File/Folder from a jar pragmatically in java. I have a jar ABC.jar contains files, folder and another jars say child.jar. under child.jar I want to delete a specific file. How can I do? so that my ABC.jar structure remains…
Tom
  • 132
  • 2
  • 11
2
votes
1 answer

How to use ant unjar file from a jar into a specific directory without path from jar

I want to copy files from within a jar to a specific directory without preserving the path in the jar. I can use unjar to find just the files I want from the jar OK:
Bohemian
  • 412,405
  • 93
  • 575
  • 722
0
votes
1 answer

Why does un-jar then jar again break my Spring Boot web app?

I built a Spring Boot web app (using Eclipse/STS) that has an embedded tomcat server. I need to do some (obfuscation) stuff to classes inside the WAR file and the zip it back up again, but before I try that I'm unzipping and then zipping up again to…
AvaTaylor
  • 623
  • 4
  • 16
0
votes
1 answer

How to unjar a file referencing it from the classpath in ANT > 1.7 but < 1.8

I am looking forward for an example which unjars a file referenced from the classpath inside the ANT. I couldn't find any example in the web. When I tried using the path inside the unjar target, it unjars all the jar files inside the classpath. Can…
0
votes
1 answer

How unjar every jar referenced in javac.classpath to a folder?

I have unjar ant task like below that was working until I changed classpath to include one more jar file. Wondering what the trick is to unjar every jar listed in javac.classpath. Basically it is breaking once javac.classpath has more than one jar…
videoguy
  • 1,732
  • 2
  • 24
  • 49
0
votes
1 answer

Unziping a file that contains other Zip Files

I'm trying to unzip a files that contain other zip files. My attempt is based on the following Java2s code: http://www.java2s.com/Code/Java/File-Input-Output/LoadresourcefromJarfile.htm. My only difficulty is that when an entry is itself a Jar file,…
Klaus
  • 2,328
  • 5
  • 41
  • 62
0
votes
0 answers

hadoop unjar temp dir is not generated in ${hadoop.tmp.dir}

I encountered one issue where hadoop unjar command doesn't really generate temp jar dir in /mnt/hadoop/tmp/hadoop-${user.name}. The context is that I want to get one shell script file from a jar file using…