I’m currently passing a very large classpath to javac to compile a java project.
I know that a number of those jar files aren’t needed.
Is there a simple way of finding out which files aren’t needed?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need the Class Dependency Analyzer tool. To quote the introduction:
True, it won’t catch runtime dependencies – but short of running an exhaustive 100% coverage test suite you can never be sure you’ve caught all runtime dependencies.
If you expect runtime dependencies you should use the CDA as a first-pass, then do exhaustive testing of the resultant app to ensure that there are no jar files which were only referenced through runtime dependencies.