YOUR FEEDBACK
Adobe Flex 2 - Answering Tough Questions About Enterprise Development
A Correct Person wrote: Denis Roebrt commented on the 21 Aug 2006 "Tough Que...
SOA World Conference
Virtualization Conference
$50 Savings Expire May 23, 2008... – Register Today!

2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts

SYS-CON.TV
TOP THREE LINKS YOU MUST CLICK ON


WebLogic on the Mac
A development environment worthy of serious consideration

Digg This!

You may not be aware of it yet, but Mac OS X - version 10.3, better known as Panther - is a great Java development environment.

I am a fairly recent Mac convert from the Windows and sometimes Unix/Linux world that I lived in. Maybe you are like me. Maybe aliens have abducted your friends and have turned them into Mac converts as well. Maybe you should join us. Speaking for myself, being able to use the Unix-based Mac OS X for WebLogic/J2EE development has given me yet another reason to be both a Java and a Mac Evangineer.

So what makes Mac OS X such a great Java development environment? Let's start with the best user interface on the planet. Add to that the core power of Unix and the ability to develop in an environment that more closely simulates the likely deployment environment for many enterprise applications (i.e., Unix-based Solaris, HPUX, and Linux). Top it all off with the use of BEA WebLogic Server and WebLogic Workshop for a surprising package of ease of use, power, and productivity.

This article is not a tutorial on WebLogic Server/WebLogic Workshop, or on Mac OS X, but it is an overview of where these technologies meet to create something that is unparalleled in the industry - a J2EE development environment on a Unix desktop done right. I will, however, provide you with basic instructions on how to set up your Mac on a productive WebLogic and WebLogic Workshop development environment. I used these instructions myself to set up WebLogic Server and Workshop successfully on my own Power Mac G5 and have used this environment to quickly and successfully create a small Web application. This application captures information, sends the information through a Page Flow (as a FormBean), writes that information to disk by using a Workshop FileControl, and finally exposes this functionality as a Web service. To do this, I created my own Workshop Domain using the Domain Configuration Wizard. All of this worked just fine, although there were some bumps along the way. I will share some of these with you.

It is important to note that at this time the Mac OS X and the Mac JVM are not official BEA-supported platforms. You must use this information within that context. So, it is up to the developer community to take it to the next level - take WebLogic Server and Workshop for a spin, report any bugs, make suggestions, and get involved.

Mac OS X Development Benefits

I wasn't going to spend much time justifying the Mac as a development platform, but I realized that a number of people may not have followed the astonishing progress of the Mac lately. You probably relate to the Mac as the "right brain" in the computing world, the creative side used by graphic artists and other nontechnical kin.

The release of Mac OS X offers the power of Unix as the foundational OS substrate with, arguably, the best GUI on the planet. The only other desktop OS to effectively combine Unix and GUI is Linux. We all love Linux, but from an ease-of-use and overall desktop capabilities standpoint, it can't hold a candle to the Mac's eadership in interface technology and implementation.

But don't just take my word for it; even the Father of Java, James Gosling, has fully embraced the Mac platform (see www.apple.com/pro/science/gosling/). According to the article, James and most of his development team love developing on a Mac because it blends the power of UNIX with the best MMI (man-machine interface) or user experience available. That is to say, it provides the power of a Unix server with the ease of operation that a Windows system aspires to.

An article in the March 2004 issue of Java Developer's Journal (Vol. 9, issue 3) talks through some additional benefits of Java on Mac OS X (www.sys-con.com/story/?storyid=43949&DE=1 ).

Here are some detailed reasons why Mac OS X is a great WebLogic/WebLogic Workshop development environment.

  1. Java delivered as part of core system (i.e., JDK included): Java is well integrated into the OS, not an afterthought.
  2. GUI: Unequaled ease of-use and history of excellence that other "alternative" desktops don't have.
  3. Unix core: Utilities and productivity tools all at your fingertips.
    - Keep your valuable UnIX skills up while improving your productivity with WLW's 10 x productivity gains: You can issue all your favorite commands right from the Terminal window (available in the Applications/Utilities folder).
    - Solid UNIX distribution: Distribution of Unix on Mac OS X is BSD (Berkeley Software Distribution) that has been in existence since the '60s.
  4. Integrates into Office Environment: Plays well with productivity tools like MS Office Suite for Mac (used in writing this article) so you will not be isolated from your team when it comes to sharing standard documents.
  5. Simple networking: Hook your Mac up to your home network, allowing you to do cross-platform validation and clustering in the comfort of your home.
Now let's get on with the task at hand of installing, running, and developing with BEA WebLogic Server and WebLogic Workshop.

The installation process really is as easy as 1-2-3.

  1. Download the correct distribution
  2. Run the installer
  3. Fix the Mac JVM distribution
With those simple steps completed you are now ready to run WebLogic Server and WebLogic Workshop, but you might want to refine the environment a little.

Installation

The following instructions assume that you are using Mac OS X 10.3 and have JDK level 1.4.2 installed. You can check this by (a) running "java -version", which should show you that the version is 1.4.2_03 (as of this writing); or (b) by navigating to /System/Library/Frameworks/JavaVM.framework/Versions, from which you should see folders for 1.2/1.3/1.3.1/1.4.2. If 1.4.2 is not the version you see as the most recent folder, make sure to upgrade before continuing.

Step 1: Download the Installation
This part is easy, as long as you have a high-speed connection. The first thing to know is which distribution of WebLogic Server 8.1 SP2 to get from BEA's download site (Click Here !). Your first choice is (a) WebLogic Platform Net Installer, (b) WebLogic Server Package Installer, or (c) Mail CD. I used option "b"and selected the IBM AIX (5.1,5.2) option, which will allow you to download a JAR file called pj_server812_generic.jar. Save this file to any folder that you use to store installation files. This file is 221.4 MB.

The file you download is the "generic" distribution that ends in ".jar" and is labeled as the AIX version on the download site. Note that this WebLogic Server/Workshop distribution, unlike, for example, the Windows distribution, does not include a JDK. We will use the JDK distribution that comes with Mac OS X 10.3 (Panther). More discussion on using the native JDK is in the "Fix the Mac Java Distribution"section.

Step 2: Run the GUI Installer
Now for installing the software. I will discuss using the GUI install wizard, though there is the option to install from the command line and even to do a silent installation. I will not bore you with the details, but you follow the directions listed in the installation guide at edocs.bea.com/wls/docs81/install/instprg.html#1054300.

Essentially, you run the following command and you are off and running/installing. The wizard walks you through the handful of steps to finish the installation.

java -jar pj_server811_generic.jar

Step 3: Fix the Mac Java Distribution
A word on the base install of your Mac JDK: the integration between the JDK and the OS is tighter than it is on other platforms. In fact Mac OS X has a layer of indirection that makes upgrading to new JDKs easy for the average user, but can be a little confusing at first glance to developers who need to know where, for example, the JAVA_HOME is.

If you try to run WebLogic Server or Workshop before you do this "fix," your servers will not start up because some directories are missing that Server and Workshop look for and, when missing, they will cause Server and Workshop to assume that you are not pointing to a valid JDK install. Further background information on the Mac JVM layout can be gleamed from an outstanding book, Mac OS X for Java Geeks by Will Iverson (O'Reilly; 2003).

Issue the following commands to allow WebLogic Server/Workshop to see your JDK as valid:

  • sudo su: This is the substitute-user command allowing a permitted user to execute a command as the superuser or another user, as specified in the sudoers file.
  • mkdir -p /Library/Java/Home/jre/bin: Create the missing bin directory.
  • mkdir /Library/Java/Home/jre/lib: Create the missing lib directory.
  • cd /Library/Java/Home/jre/bin
  • ln -s ../../bin/java: Create a symbolic directory link to existing Java executables directory. A link is useful for maintaining multiple copies of a file in many places at once without using up storage for the "copies'"; instead, a link "points" to the original copy.
  • cd ../lib
  • ln -s ../../../Classes/classes.jar rt.jar: Create symbolic file links to existing Java library files.

Refining the Installation

After you open a terminal shell and you start the WebLogic Workshop IDE (or ISE as Gartner would call it), and attempt to run an application, Workshop tries to use Internet Explorer as the default browser. It is worth noting that you can theoretically set the browser to be anything you want. I was able to get Safari to partially work, meaning that it will auto-launch as the test harness from WebLogic Workshop when you hit the Run option. I was not, however, able to get the Mac version of Internet Explorer to auto-launch. The good news is that Netscape 7.1 for Mac OS X ran beautifully!

An issue that I ran into is that the HTML and Applet that is part of the WebLogic Server console completely and utterly refuses to load in the Safari browser. So, whereas I was using Safari for the Workshop browser, for administration in the WebLogic Server console, you must use another browser such as IE.

To specify the browser that Workshop will use, you need to set the IDE properties by going to the Tools>IDE Properties menu.

Initially, I selected "/Applications/Safari.app/Contents/MacOS/Safari" to indicate Safari as the browser. It is interesting that the "Browse" button on this screen will let you navigate to the correct directory but this directory is not visible to Mac's Finder (analogous to Window Explorer) unless you CTRL-CLICK or right click the Safari icon and select "Show Package Contents" from the context menu and drill in from there.

I was able to get Safari auto-launched from Workshop's Run option, but a lot of extraneous information is pre-pended to the URL. If you clear this garbage (file:///Users/patshepherd/beaplat/weblogic81/workshop/) and fix the single slash just after the port number (http:/localhost:7001/GettingStarted/Controller.jpf > http://localhost:7001/GettingStarted/Controller.jpf), then the application will run and you will even be able to debug your application. This, quite frankly, can be quite a speed bump in the standard build-test development cycle (see Figure 1).

When I found that Netscape 7.1 will auto-launch, I was overjoyed. That was until I tried to hit the WebLogic Server console and found that Netscape does not load the console's applet(s) either. Figure 2 shows the path I used to register the Netscape browser to auto-launch.

In summary, the Netscape browser is your best bet to use as Workshop's auto-launched browser, but none of the browsers will load the Server console applet(s). One quirk you will notice, though, is that Netscape will not automatically notify Workshop that the debug session is over when Netscape is closed - this is normal behavior on the Windows platform. The Netscape browser can be obtained at channels.netscape.com/ns/browsers/download.jsp.

Running the Domain Configuration Tool

The Domain Configuration Tool allows you to quickly create a domain from a predefined template.

While creating your domain, you will be asked to specify the directory where your JVM lives because, obviously, you are using your native Mac OS X JVM and none has been supplied as part of the generic distribution we have installed (see Figure 3).

I got my domain running by selecting the linked directory shown in the browser tree which is, as discussed earlier, a link to the /Library/Java/Home directory we fixed earlier (see Figure 4).

Tips and Tricks

Cut and Paste
One joke I always tell is that "Copy, Paste" is the world's most prevalent form of code reuse. So, you might get frustrated using the standard Apple key combination of CMD-C for "copy" or CMD-V for paste. It is worth noting that the shortcut keystrokes in Workshop are exactly the same as they would be in the Windows world where, for example, CTRL-C is the standard "copy" combination. In fact, all key combinations are the same as their Windows brethren (with the exception of things like CMD-Q for "quit").

Terminal Velocity
Now is a great time to mention a very useful feature - the ability to drag a script file from finder and drop it right into the terminal shell. No more need to type in long path and file information to execute a start script, for example. Figures 5a and 5b show the result of dragging the file "config.sh"onto the terminal shell to start the Domain Configuration Tool, but the process works equally well for launching the start scripts for WebLogic Workshop or WebLogic Server.

Summary

For developers who are interested in a Java development environment that gives them "the best of both worlds" - the best user interface coupled with the power of a very mature UNIX distribution - you should seriously consider Mac OS X. While Apple was slow to keep the JVM versions in OS 9 up to date (never made it past 1.1.8), with Mac OS X Apple is now shipping a native 1.4.2 JVM that establishes Java as a first-class citizen in the Mac world.

Adding BEA's J2EE-based Application Platform Suite (APS), developers can leverage the power of Mac OS X to begin to develp world-class, service-oriented applications.

There are parts and pieces of Workshop that do not fully work on Mac OS X, but keep in mind that, as I stated earlier, Mac OS X is not currently a BEA-supported platform and has not gone through rigorous certification. With the BEA and Mac communities working together, Mac OS X could become a premiere development environment for truly serious developers. If you want to register with BEA your interest in making Mac OS X a BEA-supported platform, please e-mail Weblogic-on-osx@bea.com and Put "OS.X interest" in the subject.

Acknowledgements

I want to acknowledge some very useful postings by various users on O'Reilly Developer WebLogs hosted by BEA's Rod Chavez. There is a steady stream of postings there and interested readers should feel free to contribute to the momentum with their own postings. (www.oreillynet.com/pub/wlg/4091).
About Pat Shepherd
Pat Shepherd has been an active member of the Java revolution since its inception in 1995. He has written for several magazines and was a technical editor for the Sams book BEA WebLogic Platform 7. He has worked at BEA for more than five years and is currently a global account architect who spreads the Java/SOA message everywhere he goes.

JavaRules wrote: As a recent refugees from Linux and Windows, I agree completely. Mac is a really nice environment and really ideal for Weblogic development. I would add is a small, maybe trivial, detail as illustration. The Mac comes with a wider screen geometry than is usual for PCs. This is ideal for environments such as BEA Workshop. Whenever you look at anyone working in Workshop on a PC, they tend to keep resizing the windows all the time. I even saw demonstrators doing it a keynotes at the BEA World conference. In fact all that is needed is wider screen ratio to make everything viewable. This is just a small example of things that have been thought out and there are many such details. Certainly, you could buy such a screen for your PC. Similarly, many Mac OS X features could easily be implemented in another env...
read & respond »
BEA WEBLOGIC LATEST STORIES
3rd International Virtualization Conference & Expo: Themes & Topics
From Application Virtualization to Xen, a round-up of the virtualization themes & topics being discussed in NYC June 23-24, 2008 by the world-class speaker faculty at the 3rd International Virtualization Conference & Expo being held by SYS-CON Events in The Roosevelt Hotel, in midtown
Microsoft To Keynote 4th International Virtualization Conference & Expo
Mike Neil is general manager for virtualization strategy in the Windows Server Division at Microsoft. Mike is focused on the delivery of the Windows virtualization technology, including Windows Server 2008 Hyper-V, Microsoft Hyper-V Server and Virtual PC 2007. Mike also directs the tec
Virtualization Meets DaaS - Desktop-as-a-Service
After a $1.5 million angel round, Desktone, which was started in 2006 by Eric Pulier, who also started SOA Software, US Interactive and IVT, picked up $17 million in first-round funding about a year ago from Highland Capital Partners, SoftBank Capital, Citrix Systems and the China-base
Engelbart's Usability Dilemma: Efficiency vs Ease-of-Use
The mouse was the original idea of Doug Engelbart who was the head of the Augmentation Research Center (ARC) at Stanford Research Institute. Engelbart's philosophy is best embodied, in my opinion, in the design of another device that he invented, the five-finger keyboard - with keys li
Web 2.0 Is Fundamentally About Empowering People
'Unlocking content to be remixed into new business value' is the driver of Web 2.0 in the enterprise, says Rod Smith, IBM VP of Emerging Internet Technologies, in this Exclusive Q&A with Jeremy Geelan on the occasion of IBM's release of a new technology created by IBM researchers, code
Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
Here is a question that I have been pondering on and off for quite a while: Why do 'cool kids' choose Ruby or PHP to build websites instead of Java? I have to admit that I do not have an answer. Why do I even care? Because I am a Java developer. Like many Java developers, I get along w
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

MOST READ THIS WEEK
ADS BY GOOGLE
BREAKING NEWS FROM THE WIRES
AmberPoint Extends SOA Governance to Apache ServiceMix, BEA AquaLogic Service Bus 3.0, BEA WebLogic Integration, Cisco ACE XML Gateway, JBoss Enterprise Application Platform and Oracle Fusion
AmberPoint announced today that it has extended the reach of its runtime SOA governance