Solved

How to remove unnecessary JAR files ?

Posted on 2013-11-14
7
633 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 27

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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle SQL syntax check  without executing 6 75
use lov values 2 63
Setup GlassFish 4 22
What browser will run Java? 7 64
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

828 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