Monthly Archives: October 2022

Install WebObjects/Wonder development environment on Linux

I have tried to install a running development environment for WebObjects applications on Linux (OpenSuse 15.4 and Xubuntu 18.04). There are some little problems to solve.

  1. You need an JDK 1.8 on your computer (in parallel with the current JDK11)
  2. You need an installation of ANT
  3. You need an Eclipse IDE.
  4. You need the WebObjects frameworks.
  5. You need WOLips as plugin to Eclipse.
  6. You need the WOnder source for modern applications.

Let’s start with the installations.

zypper install java-1_8_0-openjdk java-1_8_0-openjdk-devel java-1_8_0-openjdk-javadoc java-1_8_0-openjdk-src java-1_8_0-openjdk-headless java-1_8_0-openjdk-demo
zypper install ant

apt install openjdk-8-jdk openjdk-8-demo openjdk-8-doc  openjdk-8-headless openjdk-8-source
apt install ant

Now you have to download the Eclipse IDE (for Java Developers or for Enterprise Java and Web Developers).

https://www.eclipse.org/downloads/packages/

You can install it on /opt (extract the tar.gz there).

I have installed the WebObjects stuff into its own folder called “WODevelopment” within your home folder. There is also the preferred workspace folder for Eclipse.

cd ~
mkdir -p WODevelopment/workspace

Start the IDE with this workspace folder to see any problems. Maybe you have to install some more things you need, like Subclipse.

Now you install the WOLips plugin into Eclipse. Go to Help->Install New Software->Add and create a new location.

WOLips410
https://jenkins.wocommunity.org/job/WOLips410/lastSuccessfulBuild/artifact/temp/dist/

Select all options (the WOLips Goodies are not installable on Linux) and install them. After an IDE restart, you can open a new perspective “WOLips”.

The plugin needs a lot of WebObjects frameworks, which you have to install now. Actually there is an install tool, called WOInstaller, but this doesn’t work for me, it always stops with an exception message. I have tried two versions and end up with a manual installation.

curl -O https://jenkins.wocommunity.org/job/WOInstaller/lastSuccessfulBuild/artifact/Utilities/WOInstall/WOInstaller.jar
curl -O https://wocommunity.org/documents/tools/WOInstaller.jar
java -jar WOInstaller.jar 5.4.3 ~/WODevelopment/Libraries/WOnder

If you get also an exception, try the following.

  1. Go to the GITHUB project of the installer and look for the WebObjectsInstaller.java
    https://github.com/wocommunity/wonder/blob/master/Utilities/WOInstall/Sources/er/woinstaller/WebObjectsInstaller.java
  2. Copy the download link for the latest WebObjects version 5.4.3, which you will find as static value on top of the file
  3. Download the .dmg file (Mac archive)
  4. use 7-zip (7z) to extract the file

You will find a folder “WebObjects Update/Packages”, which contains four further archives (.pkg). These archive files you can also decompress with 7-zip. It generates a “Payload~” archive, which you decompress again.

7z x WebObjectsDevelopment.pkg
7z x Payload~
rm Payload~
7z x WebObjectsDocumentation.pkg
7z x Payload~
rm Payload~
7z x WebObjectsExamples.pkg
7z x Payload~
rm Payload~
7z x WebObjectsRuntime.pkg
7z x Payload~
rm Payload~

Now you have three folders (Developer, Library, System), which you copy into “~/WODevelopment/Libraries/WOnder”.

mkdir -p ~/WODevelopment/Libraries/WOnder
mv Developer ~/WODevelopment/Libraries/WOnder/.
mv Library ~/WODevelopment/Libraries/WOnder/.
mv System ~/WODevelopment/Libraries/WOnder/.

Check the owner of the files and use “chown” if necessary.

Now its time for the global wolips properties file, which contains some settings for the Eclipse plugin and the ANT build pipeline. The file must be on “~/Library/Application Support/WOLips/wolips.properties”.

mkdir -p "~/Library/Application Support/WOLips"
touch wolips.properties

Edit the newly generated file and copy the following properties into it. Change the path prefixes, as necessary, i.e. /home/me/WODevelopment. Don’t use Shortcuts like “~”. Be careful, every path must exist within the filesystem, generate them, if necessary.

wo.system.frameworks=/home/me/WODevelopment/Libraries/WOnder/System/Library/Frameworks
wo.bootstrapjar=/home/me/WODevelopment/Libraries/WOnder/System/Library/WebObjects/JavaApplications/wotaskd.woa/WOBootstrap.jar
wo.extensions=/home/me/WODevelopment/Libraries/WOnder/Library/WebObjects/Extensions
wolips.properties=wolips.properties
wo.system.root=/home/me/WODevelopment/Libraries/WOnder/System
wo.user.frameworks=/home/me/Library/Frameworks
wo.external.root=/home/me/WODevelopment/Libraries/WOnder/External
wo.local.root=/home/me/WODevelopment/Libraries/WOnder
wo.apps.root=/home/me/WODevelopment/Libraries/WOnder/Library/WebObjects/Applications
wo.api.root=/home/me/WODevelopment/Libraries/WOnder/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.WebObjectsReference.docset/Contents/Resources/Documents/documentation/MacOSXServer/Reference/WO54_Reference
wo.local.frameworks=/home/me/WODevelopment/Libraries/WOnder/Library/Frameworks
wo.network.root=/home/me/WODevelopment/Libraries/WOnder/Network
wo.network.frameworks=/home/me/WODevelopment/Libraries/WOnder/Network/Library/Frameworks
wo.user.root=/home/me
wo.server.root=/home/me/WODevelopment/Libraries/WOnder/Server

The last step is the download and the build of the WOnder source code, the current community extensions to WebObjects.

Go to the GITHUB repository of “WOnder” and download the latest release as ZIP archive.

https://github.com/wocommunity/wonder/releases/latest

Extract the downloaded archive file into the “~/WODevelopment/WonderSource”. Use the tar.gz instead of zip, there is a problem with long filenames.

tar xvzf ~/Downloads/wonder-<version>.tar.gz
mv ~/Downloads/wonder-wonder-<version> ~/WODevelopment/WonderSource

Copy the “wolips.properties” file as “build.properties” into “~/WODevelopment/WonderSource”. It is the config for the following ANT build process.

cd ~/WODevelopment/WonderSource
cp ~/Library/Application Support/WOLips/wolips.properties build.properties

Start the build with JDK1.8 (!). There can be some warnings, but it should end with “BUILD SUCCESSFUL”.

JAVA_HOME=<path to JDK1.8> ant all

Now you can start WebObjects development of your own project within Eclipse. The projects within Eclipse should use Java 1.8 within its Build Path, add this JRE as installed VM.

If you start the first project, you will get an error, that the application cannot be opened within the default browser. Linux is not a supported development platform. So you have to add a special method within your Application.java file:

@Override
public boolean _isSupportedDevelopmentPlatform() {
   return super._isSupportedDevelopmentPlatform() || "Linux".equals(System.getProperty("os.name"));
}

After that, WOLips will call /usr/bin/open to execute the dynamic application URI within the default browser. But this will not work within Linux, but you can define a symbolic link (as root) to your preferred browser:

cd /usr/bin
ln -s /usr/bin/firefox open

Now the browser should automatically display your application within Firefox.