Sun's Java System Application Server on Mac OS X

SJS Application Server

on Mac OS X

What is this about : SJS AppServer 9.0 is the Java EE implementation at Sun Microsystems, Inc, it can also run on Mac OS X !

For the past year, I have been quite busy, at work with various unrelated projects and at home with a new baby. One of my favourite project -which, unlike others, did not keep me awake at night- was to port the Sun Java System Application Server PE to the Mac OS X platform. Now the Appserver is a massive piece of software, and since it is now open source, one could count the lines of code for me. In the meantime, without exagerating, it sounds very scary to port an Java EE Application Server. But when my director sweetened the deal with a Powerbook, I -one could say- gladly accepted the challenge.

Already dreading having to give this jewel back after just a few weeks, crawling like a decripit wreck after nights of hacking, I prudently started on the task, not knowing really what I embarked onto. Afterall, I was a complete OS X novice ! Right, let's talk about my background : I have no loyalty. I have worked with Solaris, JDS Linux and even Windows for many years but never really touched a Mac (outside of some dribbling visits at various Apple stores). So, it took me a few hours to get around the new OS, find the develpment tools I needed and create all the proper unix settings to checkout the workspace from our CVS server.

After that, I can honestly say it took me about the 2 working days to get the application server to start, but don't tell my manager, I spend three more days playing with panther... Anyhow, most of the problems I ran into where :
    - use of makefiles : yep, that's right, we used some good old fashion makefiles that knew nothing about that Darwin name.
    - jni libraries : oh well, to store our encrypted passwords, we used a C library invoked using JNI. As it turn out, that one file (yes 1 file) kept me busy half a day because of some differences in the way environment variables can be retrieved with Darwin. Now that's pretty bad, we had only 1 C file, and I ended up spending 4 hours on it.
    - JDK file layout differences, the Apple folks have organized their JDK very differently than us at Sun, so I had to change a few things in code that was being to smart about where the java compiler would be for instance.

To finish the job, I had to spend few more days to iron out some issues around class loading, CORBA integration and other goodies I could live without, but it was so easy, getting a Powerbook out of it was a complete steal ! And with it, I could even create DVDs of the offspring for the grannies, life was beautiful !

As a conclusion, I can honestly say the Java is a fantastic cross platform development tool (outside of being a great language with the best class library), because for 99% of our code, it just worked. And yes, we had some Swing apps and other GUI goodies, and that worked too ! To be completely fair, it is true that our appserver was already running on Solaris and Windows but still, after spending the last 9 years at Sun developping Java, I was amazed and proud how easy it was.

Ok, I am on the edge of boring you all now, so let's dive into why you all came to read my little essay, AppServer on OS X !

First thing to do, decide which version you want to use :
  • Project Glassfish : This is the open source project for the Sun Java Enterprise System Application Server 9.0 Platform Edition. You can download nightly builds, checkout the code from CVS directly and start contributing with the Java EE community. This one requires Tiger since you must use Java SE 5.
  • Sun Java Enterprise System Application Server 8.1 : This is the last version we released, it passes all CTS tests on the mac and it is free to use, develop and deploy. To get it, you need to install the cobundle with Netbeans or Creator since it was not released unbundled. It works on Panther and Tiger with JDK 1.4.2 or 1.5.

Project Glassfish

Fantastic ! you are ready to live on the leading edge of Java EE 5 development as it happens, and participate to the excitment of seeing it happening.

Well, there is not much I need to say in this blog, just go to
There you will have the ability to join the growing community of glassfish developers, you just need to either download the latest nightly or promoted build or even better, you can checkout the code directly from our cvs server and get to operate on the code, including mine (talk to me first, so we can be all productive)...

This is exciting development, to have this free product becoming now an real Open Source project under CDDL. Plenty of other blogs will explain how to use Netbeans and alternate tools to develop with Glassfish, so don't hesitate joining forces.

Glassfish Home Page

The only trick is that you need JDK 5 installed on your Tiger, and since by default, JDK 1.4.2 is enabled, I have updated the FAQ on the glassfish project website but basically you need to set tow environment variables :


that's all you need to build your version of this OpenSource Application server.

How to install 8.1 on Mac OS X

The Appserver was released as part of the Netbeans or Java Creator bundles so let's get it from them !
  1. Go to Netbeans Homepage and download Netbeans 4.1, choose the bundled version with SJES Appserver 8.1
  2. double click on the jar file ;-)
  3. you should get this

    Installation Welcome Screen
  4. follow the instructions to install the bundle... make a note where you install the Netbeans bundle

    Choose installation directory
  5. strolling along... remember to choose the right JDK in case you have more than one installed...


Once finished with the installation. you can go to /Users/JohnDoe/Applications/ or wherever you have installed your Netbeans bundle, this is the standard installation of your application server.

you can go to the bin directory and do
    asadmin start-domain

you can also look at the startup log, see below the end of the startup procedure !


et Voila !
, , , ,

Post a Comment:
  • HTML Syntax: NOT allowed



« October 2015