Solved

How to remove unnecessary JAR files ?

Posted on 2013-11-14
7
623 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java Message handling in Service Layer 3 58
Eclipse IDE - Cannot copy/paste from console output 8 132
GUI builder for Eclipse? 8 27
servlet filter example 37 44
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

895 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

13 Experts available now in Live!

Get 1:1 Help Now