• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet Code Management

 
Mark Binau
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two questions about how to best handle applets. I am developing in WSAD5 (Eclipse 2) and planning to run my applications in WebSphere 5.
1. Where should I maintain the applet source code? If the source code is included in the web project with the servlet source code it will compile to the webApplication/WEB-INF/classes directory and I must either move or copy it to the webApplication/classes so it can be used by the client. Is there some other way to elegantly change the location of where the code is compiled? The build output folder only seems to allow a single location per project and it can only be in the same project.
2. Is there an elegant way to automatically recreate the applet jar files when the source code changes? I know how to use the jar packager but it requires me to manually update the jar. I am hoping for a utility to automatically build the jar(s) anytime the applet source code changes. I have looked at the zip creation utility by Tim DeBoer and it works great for a utility project but does not allow me to cherry pick specific classes to include in the jar so that size of the applet jar is minimized.

Thanks,
Mark
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a little checkbox down at the lower left. Click it to enable different source directories to build into build directories of their choice.
You can also make a separate project for the applet, have it produce a jar (recommended), mark the webapp project as being dependent on the applet project and reference the applet jar as an external jar. As far as project-to-project copying goes, I think you may need to put that in an Ant script. The alternative would be to demote the applet and webapp sub-projects to be separate directory branches or play similar directory games.
 
Mark Binau
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim, thanks for the quick response. I don't see the "little checkbox down at the lower left". I am selecting the web project in Navigator view and choosing properties. From there I select Java Build Path. The Source tab is where I can create additional source folders. Underneath the tabs is where the Build Output Folder location is specified. Where in this do you see the littel checkbox? Or are you talking about some place else completely?
Below is my version from the Help/About:
WebSphere Studio Application Developer (Windows)
Version: 5.0.0
Build id: 20021125_2118
Thanks,
Mark
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Ant and it will solve all of your problems (Seriously). I haev a project that has servlets/JSPs, static stuff (like HTML and images) and an applet and Ant does all the build work for me.
brian
 
Mark Binau
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Brian. I'm in the process of learning Ant now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic