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.
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.
An IDE is no substitute for an Intelligent Developer.
Joined: Mar 04, 2004
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