In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.