Clean up redundant jar packages in your app with Loosejar

Source: Internet
Author: User

as the scale of the application grows, the number of dependent jar packages is also significantly added. There is no shortage of unnecessaryjar package that takes up a lot of valuable space. by Loosejar this tool. You can easily find the "impostors"jar wrapped up ~
Loosejar works by using ClassLoader. As the application is executed, whichclass, ClassLoader will load the class. class file into the JVM and generate a class pairlike. You can then use reflection to execute the method of this class, so which. class files are loaded, ClassLoader is clear, using this feature, you can know the actual use of the class in the jar packageand the actual use of the jar packages in the application.


The first step: Place the Loosejar.jar in Lib under the application's Web-inf, for example, the path is
D:/workspaces/appnotify/webroot/web-inf/lib/loosejar.jar

Step Two: Configure the JDK in the installedjres inside the IDE-dfile.encoding=uft8
-javaagent:d:/workspaces/appnotify/webroot/web-inf/lib/loosejar.jar

Step three: Launch the app. Try to test your application with the full coverage of the path as much as possible so that each piece of code is
line.

Fourth Step: Under Install the JDK path. Jconsole in the Bin directory, select the port of Bootstrap, and
after selecting the Com.googlecode.loosejar under the Mbean click Summary, you can see the results of the analysis ~

Clean up redundant jar packages in your app with Loosejar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.