there’s more and more development being done on top of Mac OS X. and
PowerBooks (esp. the new 15″ model) are rapidly becoming the laptop of choice
for alpha-geeks everywhere. so i thought i’d take advantage of the trailblazing
work done by Sam Pullara here at
BEA, who has been doing his dev work on a
PowerBook for over a year now. he had to write some code to support this, but
using what he’s built you should be able to run WLS on your Mac. i’ve taken his
binaries and some rather terse notes <g>, along with many IM sessions, and
turned them into this post
i’ve only verified that this works under the latest version of Mac OS X,
codename Panther. while i haven’t verified it myself, Sam tells me that it runs
just as well under the previous version, codename Jaguar
next, a disclaimer: running WLS on Mac OS X is not supported by
BEA. Sam, myself and others using Apple hardware here at BEA will try and
support you (answer questions, potentially patch things, etc) but this is would
be totally ad-hoc. if you want BEA to make this a supported (at least for
development) platform, please let
Andrew Littlefield or myself know. since
the decision would really start with Andrew, he’s the guy you should contact.
don’t be shy <g>
all right, let’s do this. the first thing you need to do is check and make sure
your Java environment is working properly. for example, after upgrading to
Panther, mine wasn’t. it turns out that the Panther upgrade process can hose
your Java environment depending whether you’ve installed a particular patch.
since i had this patch on my machine, i got nailed
to test your system, open a terminal window and type “java -version”. if you
see “HotSpot not at correct virtual address. Sharing disabled.”, your system
has been hosed. to fix your system, follow the instructions in this
Technical
Note from Apple
once you know the Java environment is running properly on your machine it’s
time to go get WLS. start at the following
link.
it gets you most of the way through BEA’s dev2dev site, but there are still a
few things you need to do manually:
- on the page i’ve linked you to, you need to select the right OS. in the
dropdown, in the 2nd section labeled “WebLogic Server Package
Installer”, pick “IBM AIX (5.1, 5.2, 32 bit)“ and then
click on the “Select >>” button to the right of the drop-down - at this point, you will be challenged for a username and password. you
can’t download without giving marketing its due <g>. if you don’t have a
dev2dev account, getting one is trivial. there’s a register button on the login
page that lets you sign up. once you’ve either logged in or registered,
you’ll come back to the right spot in the download process - once past that, you’ll see a page asking if you’re downloading a server
you’ve already paid for, or do you want to evaluate a server first. BEA now
provides a “developer license” where you can get and run the server for free
for 1-year, as long as you don’t “put it into production”. so just select
“I would like to evaluate this product” and then click
“Next >>” - you’ll now see a form asking some questions about what you want to do with
the product, blah blah blah. answer however seems best, and then click
“submit”
please note that the download process you’re forced to go through is
being streamlined and revamped, so that there will be less marketing/sales gorp
to deal with. but for now, please ignore it as best you can - next up is the License Agreement. click “I Accept” when you’re
ready - click on the download area that is the closest match to the region you’re
in and your browser should prompt you to open or save. pick save. do not
open it yet. when saving, make sure the saved name is
pj_server811_generic.jar. that should be the default, but in case your
browser did something funny…
you may be wondering why you’ve just downloaded the WLS for AIX version
when this post is all about running WLS on Mac OS X. well, notice the name of
the JAR you wound up with has generic in the title. it happens to be
that the WLS build that runs best on AIX is the generic one, and so that’s the
one to download and run on any platform not directly supported by BEA
now you need to download this ZIP file, which contains
several files to automate the rest of the install and setup process. save the
ZIP alongside the JAR you downloaded from BEA, then do the following:
- unzip the ZIP file then step into the created directory as follows:
unzip wls4mac.zip cd wls4mac
- run the script in the ZIP file. it will run the installer, configure a
domain and create a default web-app. note that if you plan on exposing WLS
on the internet, you should change the password for the user created in the
silent config script (silentC.txt) before running this command./wlsInstall
- the only thing left to do now is start the server. move to the domain
directory and start the server using the start script located therecd /bea/user_projects/domains/wls/ ./startWebLogic.sh
that’s pretty much it to getting WLS installed and running. you should be able
to follow this link,
http://localhost:7001/, to see the default
web-app running. and if you want to read more about WLS 8.1, here’s the
online documentation
but that’s not the end of our little journey here. there’s a few things we can
do to make things better. first off, notice that WLS is listening for HTTP
requests on port 7001. that’s ok if all you’re doing is development, but if
you want someone within your workgroup or department to access your content, it
sure would be nice if they could hit WLS on port 80. and there’s a way to make
that work, using the version of Apache that’s built into Mac OS X by default.
essentially, Apache can be made to forward a subset of its URI space. if you
want to do this, here’s the recipe:
- get Apache started. the instructions (trivial) are here in this article
Apple posted explaining
how - add files to Apache configuration. perform the following to commands to
copy files supplied in the ZIP:sudo cp lib/mod_weblogic.so /usr/libexec/httpd sudo cp weblogic.conf /etc/httpd/users
- kick Apache. perform the following command to restart Apache using this new
configuration:sudo apachectl restart
at this point the following link,
http://localhost/weblogic/ should now
work. it goes to the same location as the link we used before, but now it’s on
port 80, not port 7001 (actually, they both now work)
at some point down the road if/when Mac OS X becomes a supported platform for
WebLogic Server, you’ll be able to run it on port 80 without going through
Apache. but as Sam pointed out to me in an IM session the other day, this may
not actually be an improvement, since one of the key reasons Apache is in Mac
OS X is to support user file sharing. so it helps to have Apache on port 80 and
just forward when you want it too. oh well, these details can be worked out
later. but if you have an opinion about this, please let us know
now that we’re up and running, and available via port 80, how about we try to
make things a bit faster, hmmmm? if this is interesting to you, it turns
out that Sam has just the thing. he ported some of the native-io and
terminal-io code that WLS has for optimizing performance on different platforms.
it’s not required, and if all you’re doing is development, you might not want
to bother with this. but if you want to squeeze a little more out of WLS on Mac
OS X, add the JNI libraries in the ZIP file to your library path
the JNI libraries are the files in the lib directory of the ZIP file with the
file extension ‘.jnilib‘. so first, decide where you want these files to
live. we’ll call that directory $WLS_JNI. then add that directory to
your library path by running one of the following commands. if you’re using
csh, then do this:
setenv DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH:$WLS_JNI
if you’re using bash, do this:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$WLS_JNI
it should go without saying, but i’ll say it anyway <g>, you need to replace
the $WLS_JNI in the above commands with the full path to wherever you
decided to put the JNI libraries
well, that about wraps things up, with one remaining issue, which is browser
support. unfortunately, the WLS console does not do well with the browsers that
ship on Mac OS X. on Safari, things don’t work at all. on IE, it’s useable, but
the left-hand-pane where a java-applet is supposed to be just shows an error.
all the functionality is available in the main area, but navigation is clunky.
again, i’m just talking about the WLS management console. your app and its
content will be just peachy
my focus in this post has been WebLogic Server 8.1, but i’ve been asked by
several people about running WebLogic Workshop 8.1 on Mac OS X. there are a
couple of developers who’ve run it here at BEA, and think things should be ok.
but since i haven’t done that myself, i can’t verify it. if you have any
problems with WLW, please let us know. again, since Mac OS X isn’t a supported
platform, turnaround on issues will be longer. but we’ll do what we can
if you got this working on older versions of Mac OS X, let me know. also, do you think that Mac OS X should be a supported development environment for WebLogic 8.1? and what kind of projects would you work on?

