[Note to readers: this tutorial seems complete to the authors; please amend or edit for accuracy and comprehension.]
Objective: use a Microsoft PC as a WebObjects development environment
For dark reasons of your own you wish to use a Microsoft PC to develop with WebObjects. In theory, this should be highly do-able, and not especially hard if you're a competent PC programmer already, since WO development with Eclipse ought to really only require the WebObjects Java frameworks and to set up Eclipse and WOLips to see these. However, in practice the authors found this hard, and this tutorial assumes ownership of the Apple installation discs. It should also be possible to scrape the Java WO frameworks from anywhere, but again in practice, this tutorial assumes access to a Mac with a working WebObjects 5.3.3 installation. [WOL:If others are able to experiment with a more workable solution, that would be much appreciated by the community at large, we're sure].
- Apple WebObjects 5.2 installation CD for PC
- A Mac with a working WebObjects 5.3.3 installation
Process (for people who have bought Apple WebObjects 5 installation CDs)
- Install the WebObjects 5.2 tools and frameworks from the Apple CD
- Replace the installed WO frameworks with the latest 5.3.3 frameworks from Apple
- Correct required environment variables
- Install Eclipse 3.2
- Install WOLips
1. Install the WebObjects 5.2 tools and frameworks from the Apple CD
Use the Apple WebObjects 5 CD to install WebObjects Developer on to your PC. Note that this installs all the old (deprecated since 2002) PC desktop WO developer tools such as EOModeller, WOBuilder and ProjectBuilder etc. which you will not need in this process, but it also installs a number of things we do want, namely:
- a standard set of directories from which to work
- environment variables including NEXT_ROOT, WEBOBJECTS_JAVA_EXTENSIONS, WEBOBJECTS_JAVA_HOME, and updates your PATH variable with refererences to the newly installed Apple developer tools
- a set of DLLs which are used by EOGenerator (qv.) at least
2. Replace the installed WO frameworks with the latest 5.3.3 frameworks from Apple
You've installed WebObjects 5.2.2 in step one, but it is out of date, and Eclipse/WOLips requires WebObjects 5.3.3 to work. We took the frameworks as they'd been installed from a working Mac installation of WO 5.3.3 (available freely from the Developer Tools CD which ships with new Macs) and copied them to the PC.
We first deleted all the existing frameworks in C:\Apple\Library\Frameworks, which required stopping any #services that were using them, and then copied the Mac-sourced frameworks in their place. There were less of the new frameworks, which may indicate problems to come, but so far so good [#services that were stopped were Apple Mac Daemon, Apple Netname Server, Apple WebObjects Monitor 5, Apple WebObjects Task Daemon 5 & openexec - this allowed all except one final folder (AppKit.framework) to be deleted; to get rid of that it required a restart of the PC].
Easy Delete Alternative for Parallels Users
If you are installing on a Parallels virtual drive, it is less hassle to shut down the virtual PC and use the Parallels Explorer tool to navigate the virtual disk image and just delete the files. Afterward, restart the Parallels PC.
There are more frameworks installed on the Mac than seem to be required to make WO work on the PC, including frameworks in /Developer/Examples and in /Library/Frameworks (it looks as though some of these might be used by Direct2Web) but we copied everything from /System/Library/Frameworks that seemed to be appropriate [WOL:please correct and append to this list if able] which are the following:
- JavaPlot.framework (This is a legacy framework and evidently is available in a standard 5.3.3 install)
- JavaWOSMIL.framework (This is a legacy framework and evidently is available in a standard 5.3.3 install)
When you're done, you should have the Apple directory structure C:\Apple\Library\Frameworks containing the above frameworks.
3. Correct required environment variables
You need to correct any path variables that have the percentage or tilde characters in them e.g.on my PC the Java "bin" directory is "C:\Program Files\Java\jdk1.5.0_07\bin" but the installation added this in the PATH variable as "C:\PROGRA~1\Java\jdk15~1.0_0\bin" which needed correcting; likewise entries for WEBOBJECTS_JAVA_EXTENSIONS & WEBOBJECTS_JAVA_HOME had similar "~" characters.
The entry for NEXT_ROOT was created as "C:/APPLE" (where by default WebObjects is installed) - I updated this to "C:\APPLE" (I am not sure if this is required but it keeps it consistent with Windows pathing conventions i.e. back slash rather than forward slash!).
So my environment variables look like (specific output from DOS Window "SET" command):
- Path=<Existing PATH Entries>;C:\Program Files\Java\jdk1.5.0_07\bin;C:\Apple\Library\Executables;C:\Apple\bin;C:\Apple\Library\JDK\bin
- WEBOBJECTS_JAVA_EXTENSIONS=C:\Program Files\Java\jre1.5.0_07\lib\ext
- WEBOBJECTS_JAVA_HOME=C:\Program Files\Java\jre1.5.0_07
4. Install Eclipse 3.2
I already had Eclipse installed - all that is required is a standard installation (current version downloadable from Elipse 3.2).
5. Install WOLips
From Eclipse you need to Help > Software Updates > Find and Install. Then search for new features to install. Create a New Remote Site to download the current stable version of WOLips using URL of http://webobjects.mdimension.com/WOLips/stable. Select to search this site, and "Finish". Choose to install the "Standard Install" (there were 3 other options that were not installed).
6. Other WOLips Configuration
- We downloaded the latest version of EOGenerator (http://www.rubicode.com/Software/EOGenerator/), and expanded / put this in its own folder where we have our Eclipse application located (for use this was d:\dev\apps\eogenerator). From Eclipse we setup the EOGenerator preferences to use the application & templates at this location (see attachments for screen shot of preferences).
- For our development project we created a builder (in the projects properties) to automatically run EOGenerator for each build (see attachments for screen shots of this setup).
- We use MySQL so installed the connector in the Java library extensions folder (in our case the file mysql-connector-java-5.0.3-bin.jar was put in C:\Program Files\Java\jre1.5.0_07\lib\ext).
Process (for people who do not have the Apple WebObjects 5 installation CDs)
[please supply an account of your successful process here; presumably something like the following:]
- Build the appropriate directory structure
- Copy the WebObjects frameworks into these
- Add the appropriate environment variables
- Install Eclipse and WOLips