This Tech Info is written for MacOSXServer 1.2
As many people have noticed, Frameworks bearing Java Archives can easily be used in WebObjects applications, but fail to be recognized in AppKit applications. The fault lies with Apple here, as the Makefiles for applications (starting with app.make in /System/Developer/Makefiles/pb_makefiles) are not able to generate a CLASSPATH to point to the JAR files in the Frameworks. But the Makefiles for WO-apps can handle this. I know of three solutions to this problem, each with it's own pros and cons.
- Start your new AppKit project as a WebObjects application and throw out all the default .java files, remove the Web Resources and copy the Objective-C stub main function stub from another AppKit application project.
- Patch the Makefile system to use the WO-rules for building CLASSPATH. Changing the Makefile system is a "fire and forget" procedure. The only problem is the forgetting part. People that want to use your source, must patch the system in the same way. Here is the "patch"
cd /Local/Developer/Makefiles/pb_makefiles
cp /System/Developer/Makefiles/pb_makefiles/wo-postamble.make app.make.postamble.
- Use an editor to copy the needed rules (see below) into your Makefile.postamble. You might even want to modify the template /System/Developer/Makefiles/pb_makefiles/Makefile.postamble.template to include this code (from wo-postamble.make).
You also could ask your OS vendor for a fix... |