Results 1 to 2 of 2
- 09-14-2010, 11:18 AM #1Member
- Join Date
- Sep 2010
- Rep Power
How to Unjar a JAR file without JDK and without winzip/winrar ??
For one of business scenario, I want to un Jar a JAR file.
The challenge here is it should happen without using JDK.
Also, the unjar should happen without winzip/winrar.
I only have JRE installed on that system (windows).
Is there any way, I can do it.
Its a client requirement & I am stuck.. DOn't know how to do this ??
Need help from you guys...
Thanks in advance...
- 09-15-2010, 04:41 AM #2
well, i guess you could make a utility "extractor.jar", which would make use of the java.util.jar API. where you create a JarFile object to open the file and programatically iterate thru the contents of the jar file and write them to the file system, creating folder structure as required. So basically, you would create a java utility, using Java API available in a JRE, to perform the function of the "jar' command line tool.
Bonus points for making this utility inside the jar file itself, e.g. a self-extracting jar file. Where the code to extract a jar file is also inside the jar file you want to extract and is made an executable jar file with the entry in the manifest.
Though depending on what you need or are trying to do, there are existing "installer" packages that work to create a bundled self-executable jar file installer or extractor file. For example, IzPack, Mini Installer, Ant Installer. See also: Open Source Installers Generators in Java.
- By maheshsardar in forum Java AppletsReplies: 1Last Post: 08-04-2010, 03:24 PM
- By msegmx in forum Advanced JavaReplies: 0Last Post: 07-15-2010, 01:23 PM
- By al_Marshy_1981 in forum NetworkingReplies: 8Last Post: 02-18-2010, 01:54 PM
- By mahendra.athneria in forum New To JavaReplies: 0Last Post: 02-11-2009, 10:53 AM
- By padmajap13 in forum Advanced JavaReplies: 7Last Post: 05-23-2008, 03:46 AM