0

I kind of engaged in an automation process. There I have to modify a jar file (just delete two files within )and copy it to a remote location. I tried using the solution given in How to open a .jar file within Java But it didn't help (Honestly couldn't understand). Regards on a kind help. .

Community
  • 1
  • 1
javatar
  • 1,332
  • 1
  • 17
  • 24
  • How did that not help? Jar files are just zip files, so opening them like any other zip file should work perfectly. – Evan Knowles Apr 25 '14 at 07:27

3 Answers3

0

if you have WinRar or WinZip software installed just right click on jar file and click extract here all the contains of jar file will be available to you.

DCoder
  • 3,486
  • 7
  • 36
  • 68
0

This can be done easily with an Ant script by using the unzip task : http://ant.apache.org/manual/Tasks/unzip.html

jeroen_de_schutter
  • 1,843
  • 1
  • 18
  • 21
0

Just do a little research could help a lot. You can open a .jar file using winRAR then decompile the .class file as stated here How do I "decompile" Java class files?

To recompile you can use 'javac' in command prompt provided you listed all the classpath necessary. How to compile a .java file in Java?

then you can overwrite the file in .jar

Community
  • 1
  • 1
Joshua H
  • 754
  • 8
  • 18