HOWTO: Running Weblogic Server 9.2 on Mac OS X

Thursday, December 11, 2008

Being the Apple-lovin Mac user that I am, I prefer to run everything that I can natively on a Mac, as it is always faster and usually has a smaller memory footprint than running it in a Windows VM. This is espeically critical for software development as being able to work efficiently is import to finishing on time and not getting frustrated. To this end I have quested for the ability to run Weblogic 9.2 on the Mac and have it integrated with Eclipse WTP. In my search, I found many tidbits that helped me along the way, but not a full tutorial on how to do it.

For the purposes of keeping this post shorter, I am going to assume that you already know how to install and run weblogic on a supported platform and that you have the appropriate Weblogic license(s).

Step 1: Download the right file(s)

We need to start by obtaining the plain old jar version of the Weblogic installer. This can be accomplished by downloading the AIX version of the Weblogic Server 9.2.2. Don’t download 9.2.3 (the latest as of this writing) or try to get weblogic platform as you won’t be able to get the proper installer. At the end you should have server922_generic.jar. If you want to run 9.2.3 (which based on the list of fixed issues, you do) then you need to download the upgrade installer for AIX, which should get you server923_upgrade_generic.jar.

Step 2: Install Weblogic

Next you will need to launch the installer on the command line like so.

$ java -jar server922_generic.jar

Telling the installer that the OS is Unix will mean that it will load the correct tool to check the remaining disk space. If you don’t set this, it get confused because it doesn’t know what to do with Mac OS X and it will fail the space check.

The installation procedure is the same as for other platforms, so pick you BEA Home and have a ball. At the point where it asks you which JVMs it wants you to use, just say ok for the Apple JVM that it finds. If you want it run using a different JVM, the easiest way to get it to do that is to launch the installer using the appropriate one. After the installer completes, if you want to upgrade to 9.2.3, you will run the upgrade installer in a similar fashion.

$ java -jar server923_upgrade_generic.jar

Step 3: Initial Configuration

After you have gotten everything installed (or while the installer is running), you are going to need to set some memory arguments. Add the following line to ~/.profile.

export USER_MEM_ARGS="-Xms256m -Xmx512m -XX:MaxPermSize=128m"

The biggest deal here is increasing the size of the PermGen space in your JVM. The Apple JVM doesn’t set a big enough space by default, and the weblogic start scripts don’t understand Mac OS X, so they don’t set the proper memory args.

Step 4: Create a Domain

Next, you will need to create a domain, which you can do by running $WLS_HOME/common/bin/ You may want to test out your domain at this point. You can start it up by running $DOMIAN_HOME/bin/ and hit the console at the usual http://localhost:7001/console (unless you changed it while creating your domain). You will want to stop your domain after your test to ensure

Step 5: Download the Eclipse Plugin

At the time of this writing, the Ganymede version of the Weblogic WTP plugin is broken (thanks Oracle), so you want WTP integratioin (yes please!) you’ll have to stick with Europa. You may say, "What about Oracle eclipse plugins for Ganymede?" My response to that is that I wasn’t able to get these working on my Mac. (

To install the plugin goto the Eclipse Preferences -> Server -> Installed Runtimes -> Add... -> Download additional server adapters. After that is done, setup your runtime and create a new server using the Domain you built in Step 4.

Step 6: Edit Your Startup Script

Now that your server is setup, double click the server definition in the Servers View to bring up the Server Overview. Under the Server section, click the Edit link next to Startup script. Add the same USER_MEM_ARGS line from Step 3 that we added to our ~/.profile. I would also recommend adding the nopointbase argument to the line (before the $*). I have no idea if Pointbase works on the Mac as I don’t use it. Feel free to let us know either way in the comments if it does or doesn’t. If you don’t use it, adding this argument will make your startup and shutdown of Weblogic go quicker as you don’t have to wait for Pointbase as well.

Step 7: Enjoy!

You’re done! Fire up the server from inside eclipse and test it out.

Weblogic 10

I haven’t had occasion to see if I could get any of the version of Weblogic 10 (or 10g as it has now been dubbed) on my machine, so let us know if any of you out there have tried it.

comments powered by Disqus

Matt Campbell

Recent Posts

Blog Archive