In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "compression and decompression of Jar packages in Java". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the compression and decompression of Jar packages in Java.
What is a jar package?
JAR (Java Archive) is an archive of Java, a platform-independent file format that allows many files to be combined into a single compressed file.
How to hit / unpack
Using the jdk/bin/jar.exe tool, you can use the jar command directly after configuring the environment variables.
Jar command format
Jar {c t x u f} [v m e 0 MI] [- C directory] file name.
{ctxu}, one of these four parameters must be selected.
[v f m e 0 mi], these are optional parameters, and the file name is also required.
Parameter description-c create a jar package-t display contents list in jar-x extract jar package-u add file to jar package-f specify file name of jar package-v output detailed report-m specify MANIFEST.MF file-0 do not compress content when generating jar package-M does not generate manifest file MANIFEST.MF-i creates an index file for the specified jar file-C can execute commands in the appropriate directory
About the MANIFEST.MF definition:
Https://baike.baidu.com/item/MANIFEST.MF
Demo
Add files to the jar package
Jar uf xxx.jar BOOT-INF/classes/application.yml
Extract the jar package
Jar-xvf xxx.jar
Jar package, no manifest file, no compression
Jar-cvfM0 xxx.jar BOOT-INF/ META-INF/ org/
Or
Jar-cvfM0 xxx.jar *
These commands may be useful if you want to add and update some files to the online jar package to the jar package.
At this point, I believe you have a deeper understanding of "compression and decompression of Jar packages in Java". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.