Adding required classes for an applet to make a jar file.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shawn_Shawn
Posted On:   Monday, November 19, 2007 01:27 PM

Hi everyone, I have this problem which I was not able to find a solution for, So I truly appreciate any feedback on this. I have a project on eclipse which is basically an applet. This applet is using some classes in some jars that I have imported as libraries for this project. Everything works on eclipse with no problem. However I need to make a jar file of the applet and required classes to use it in an html page. Now that's the part I have been facing difficulties, cuz I have to include all the classes that the applet is using from other jar files. And I can not come up with a way to find out all those classes. On the other side if I inc   More>>

Hi everyone,


I have this problem which I was not able to find a solution for, So I truly appreciate any feedback on this.



I have a project on eclipse which is basically an applet.
This applet is using some classes in some jars that I have imported as libraries for this project.



Everything works on eclipse with no problem. However I need to make a jar file of the applet and required classes to use it in an html page.



Now that's the part I have been facing difficulties, cuz I have to include all the classes that the applet is using from other jar
files. And I can not come up with a way to find out all those classes.



On the other side if I include the whole jars then my applet goes over 100 meg and would be useless.



I am going to give an example of the problem I have in hope of making it a bit clear.
I have a applet, which uses some classes from some jars. i.e., class A. but class A itself need class B and etc.
Now how can I find all these dependencies since I have to include them along the applet in the jar file I am going to make.



Once again I appreciate any feedback and sorry that is a long question.    <<Less

Re: Adding required classes for an applet to make a jar file.

Posted By:   Robert_Lybarger  
Posted On:   Monday, November 19, 2007 10:53 PM

I've never used this option, but ant seems to have a "classfileset" task that might do what you need. You could perhaps write an ant task to unjar the supporting jar files, run the class dependency task to get a list of everything your code needs from those areas, and then re-jar stuff up together. I do hope that said libraries will allow you to do this -- redistribute, and only in part -- else the lawyers may come calling. (Note, this feature in ant says it requires an extra "BCEL" supporting library of its own to scan through your compiled class files.)
About | Sitemap | Contact