From the left navigation pane, select JARs from under Resource Browser. The Summary of JARs page is displayed. In the Options field of the JAR you want to delete, click the Delete icon.
The JVM is capable of loading classes or files from a jar file without extracting the jar to temp files. This functionality is also available to you in the standard library, see the JarFile for more information. So no, the JVM does not extract a jar to temp files, classes (and resources) are simply loaded on demand.
Here's the process: Scan forward in the file until you find the first file you want to delete. Scan forward in the file until you find the first file you don't want to delete or you hit the central directory. Scan forward in the file until you find the first file you want to delete or you hit the central directory.
zip -d file.jar unwanted_file.txt
jar is just a zip file after all. Definitely much faster than uncompressing/recompressing.
In Java you can copy all the entries of a jar except the one you want to delete. i.e. you have to make a copy but don't need to create the individual files.
You can do this by
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With