Solved

How to remove unnecessary JAR files ?

Posted on 2013-11-14
7
620 Views
Last Modified: 2014-01-03
my web application  is Struts 2 based and also consumer of  an axis 2 webservice.

There are unnecessary JAR files crowded  in my  my web application lib folder.  

I want to remove  unnecessary JAR files to clean up  the system. I am not sure which JAR files to drop.  I need assistance on this.



Please see the JAR file list  in text file attached.
listofjarfiles.txt
0
Comment
Question by:cofactor
7 Comments
 
LVL 26

Expert Comment

by:dpearson
ID: 39650345
There are tools that can help you determine which Jars are actually in use, such as Tattletale:
http://www.jboss.org/tattletale/

You should be a bit careful when removing jars that appear to not be in use - as it is possible for code to be loaded dynamically (e.g. using reflection to construct instances) and these tools may not be able to see that sort of usage.

But if you run the tool, take out the apparently unused jars and then do a solid test pass that should be OK.

Doug
0
 

Author Comment

by:cofactor
ID: 39650378
I  have checked the site.  I don't understand how to use this tool.

I have the LIB directory where all JAR's  are there.

How do I use the tool from here ?  is there any command to fire ?
0
 
LVL 11

Expert Comment

by:Manish
ID: 39650829
What I found out there
You need to run following command at command prompt.
java -Xmx512m  -jar tattletale-1.1.2.Final.jar app output
where app directory has jars and output is directory.
But it is not working on my machine. You can try.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:cofactor
ID: 39683455
This  runs fine . I  have run the command. I  got a  report file .  name of the file is index.html   in the output directory.

I attach the main  report.zip  file here. Please have a look at it.  


by looking at this report, can you please suggest what actions I should take to clean up my system ?
report.zip
0
 
LVL 35

Expert Comment

by:mccarl
ID: 39684625
That "report.zip" file only contains the main index file to all the detailed reports. There is nothing of use in this report alone. You would need to zip up all the subdirectories of that "report" directory too.
0
 

Author Comment

by:cofactor
ID: 39718679
size is big  to upload.  
can you please suggest any steps to look at ?
0
 
LVL 35

Accepted Solution

by:
mccarl earned 400 total points
ID: 39723609
Ok then, in the report.zip file that you did send, in the main index it lists an "Unused Jar" report. Start looking there, of if unsure post the content of that report (should be in a subdirectory called 'unusedjar')
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now