Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

WebLogic on the Mac

A development environment worthy of serious consideration

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.


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.


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 [email protected] and Put "OS.X interest" in the subject.


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).

More Stories By 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.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

Most Recent Comments
JavaRules 08/11/04 05:10:49 AM EDT

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 environment. The fact is, however, that they are not, and the cummulative difference is sizable and very noticable. The point is that the system is very pleasing just out of the box, which allows you to do your work instead of constantly tailoring and reconfiguring your environment. Of course, some people love to do such things and should stick to Linux. Others love to be exploited by shameless charlatans, because they have a feeling of sharing in the glory of the exploiters, such should definitely stick to Windows and endure the sweet agony of persecution.

@ThingsExpo Stories
Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
Most technology leaders, contemporary and from the hardware era, are reshaping their businesses to do software. They hope to capture value from emerging technologies such as IoT, SDN, and AI. Ultimately, irrespective of the vertical, it is about deriving value from independent software applications participating in an ecosystem as one comprehensive solution. In his session at @ThingsExpo, Kausik Sridhar, founder and CTO of Pulzze Systems, will discuss how given the magnitude of today's applicati...
What is the best strategy for selecting the right offshore company for your business? In his session at 21st Cloud Expo, Alan Winters, U.S. Head of Business Development at MobiDev, will discuss the things to look for - positive and negative - in evaluating your options. He will also discuss how to maximize productivity with your offshore developers. Before you start your search, clearly understand your business needs and how that impacts software choices.
SYS-CON Events announced today that Ryobi Systems will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ryobi Systems Co., Ltd., as an information service company, specialized in business support for local governments and medical industry. We are challenging to achive the precision farming with AI. For more information, visit http:...
As popularity of the smart home is growing and continues to go mainstream, technological factors play a greater role. The IoT protocol houses the interoperability battery consumption, security, and configuration of a smart home device, and it can be difficult for companies to choose the right kind for their product. For both DIY and professionally installed smart homes, developers need to consider each of these elements for their product to be successful in the market and current smart homes.
SYS-CON Events announced today that Golden Gate University will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Since 1901, non-profit Golden Gate University (GGU) has been helping adults achieve their professional goals by providing high quality, practice-based undergraduate and graduate educational programs in law, taxation, business and related professions. Many of its courses are taug...
SYS-CON Events announced today that Avere Systems, a leading provider of hybrid cloud enablement solutions, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Avere Systems was created by file systems experts determined to reinvent storage by changing the way enterprises thought about and bought storage resources. With decades of experience behind the company’s founders, Avere got its ...
High-velocity engineering teams are applying not only continuous delivery processes, but also lessons in experimentation from established leaders like Amazon, Netflix, and Facebook. These companies have made experimentation a foundation for their release processes, allowing them to try out major feature releases and redesigns within smaller groups before making them broadly available. In his session at 21st Cloud Expo, Brian Lucas, Senior Staff Engineer at Optimizely, will discuss how by using...
In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lead...
SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
SYS-CON Events announced today that CAST Software will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CAST was founded more than 25 years ago to make the invisible visible. Built around the idea that even the best analytics on the market still leave blind spots for technical teams looking to deliver better software and prevent outages, CAST provides the software intelligence that matter ...
SYS-CON Events announced today that Daiya Industry will exhibit at the Japanese Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ruby Development Inc. builds new services in short period of time and provides a continuous support of those services based on Ruby on Rails. For more information, please visit https://github.com/RubyDevInc.
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
As businesses evolve, they need technology that is simple to help them succeed today and flexible enough to help them build for tomorrow. Chrome is fit for the workplace of the future — providing a secure, consistent user experience across a range of devices that can be used anywhere. In her session at 21st Cloud Expo, Vidya Nagarajan, a Senior Product Manager at Google, will take a look at various options as to how ChromeOS can be leveraged to interact with people on the devices, and formats th...
SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
SYS-CON Events announced today that SourceForge has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. SourceForge is the largest, most trusted destination for Open Source Software development, collaboration, discovery and download on the web serving over 32 million viewers, 150 million downloads and over 460,000 active development projects each and every month.
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...
SYS-CON Events announced today that TidalScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale is the leading provider of Software-Defined Servers that bring flexibility to modern data centers by right-sizing servers on the fly to fit any data set or workload. TidalScale’s award-winning inverse hypervisor technology combines multiple commodity servers (including their ass...
SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, will lead you through the exciting evolution of the cloud. He'll look at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering ...