keyJavaAdditions's goal is to allow Java Applets embedding in AMT/AMTPE applications. The full source code is provided, with the express condition that the copyright mentions remain if it is redistributed or otherwise modified. If you redistribute modified source code, you are requested to mention the fact that it was modified. You are free to use this code for any non-commercial use. Please contact me for commercial use conditions.
This is a pre-alpha release and it must be emphasized that many features and improvements have not yet been implemented. So be prepared for crashes and unexpected behavior. It can be seen as a proof of concept and a testbed for designing what would be a full-featured implementation. So I expect a lot of feedback and discussion about what you think should be the main features. Some top issues I can see for now are :
1. Allow for direct embedding of a Java class, rather than an HTML applet reference. This implies finding a cool way of specifying the applet's optional parameters.
2. Allow for direct URL specification (including remote URL's). In that case the applet handler should probably not depend upon a media, but rather use an URL field.
3. Allow for direct Java method invocation from AML code using the JRI. This would be the way to make Java embedding really useful beyond simple animations or games that don't interact with the rest of the AML environment.
KeyJavaAdditions currently only works on PowerPC machines. The next release will support CFM-68K if you ask for it. The Windows version is open for discussion. If anybody out there knows of a Windows 16-bit library that provides functionnality similar to that of the MRJ SDK, please let me know !
To use keyJavaAdditions, you will first need to download and install Mac OS Runtime for Java 1.0b1 or later from Apple Computer's web sites (www.devworld.apple.com is a good starting point), as well as the MRJ SDK. If you use the Metrowerks environment, be sure to upgrade to CW10, and get the Java Tools 1.0.3 Update from <ftp://ftp.metrowerks.com/pub/updates/CW10/Java103.sit.hqx>.
You should then install the keyJavaAdditions folder on your hard drive along with the other AMTPE elements, and copy the UserStartup·keyJavaAdditions in your MPW's 'Startup Items' and 'TS Startup Items' folders. You should then restart MPW. If you are using the keyMetrowerks tools and you want to build the AMTE engine, you should also copy the file keyMWCFM.make to you Key 'Tools' folder.
The demo project comes with source files and as an AMT project. It does not come with the media's, i.e. the HTML applet descriptions as well as the Java classes, images and sounds they refer to. These can be found in the 'Mac OS Runtime for Java' folder, within the 'Apple Applet Runner' folder. You should make sure the hierarchy.k file is updated to point to the correct location. Please note that not only the HTML files should be there, but also the Java classes, images and sounds they refer to.
If you want to use the AMT demo project itself, you will first need to build an engine that can read it. The engine's project is in the 'amte' folder, and is an extension to the AMT 2.0 VR Engine. Once you have built and installed this engine, you can use AMT to embed and test other HTML applet references.
The startup files for the demo project and AMTE are configured to use the keyMW build environment. However, they might work with the MPW's classic environment, although this has not been tested. Try to replace "keyMW.make" by "keyClassic.make", and "keyMWCFM.make" by "keyCFM.make" in the startup files. If this does not work, you will need CodeWarrior (9 or 10) and download my keyMetrowerks package from <ftp://ftp.ccs.queensu.ca/pub/macintosh/amt2.0/>
or
<ftp://ftp.sky4studios.be/sky4/pub/ThirdParty/keyJavaAdditions.sit.hqx>
Please report any problems or suggestions to the e-mail address below.
Fabien Samuel
Software Tools Architect
Opti Media
e-mail : fabien@kagi.com