Question

I am relatively newbie in Java. While I was developing an applet, I made as well a library containing a series of functions to be used in a server side application.
I realized that perhaps I could shrink the jar size, by exporting only the classes, from the library, i am using inside the applet.
Is there any way to do it semi-automatic?
Some app that could point me the used classes, or something likewise...

EDIT :
Perhaps I could not express it right.
What I want to do is get which classes from this library of mine I am using for the applet.
I can do it manually, as I am doing it right now, but I would rather use a tool that would help me to create a build out of it, telling which classes I am working with, instead of a guess which I am using. I am using eclipse, but I am aware of ant. I am aware on how to build an applet, or a jar. My problem is to make it more efficiently.

Was it helpful?

Solution

This greatly depends on the tool you are using for building the jar-Files. But probably those tools already have a mechanism in place to exclude classes / files from the jar-File. A classic tool would be ant. If you are using ant, this link should provide information to you: How to exclude a directory from ant fileset, based on directories contents

If you are using a different tool, please edit your question.

On a sidenote: Are you really sure you want to use a Java Applet for a Client/Server Application. If you prefer an applet because you can distribute it easily, consider using Java Web Start.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top