How to install Oracle WebLogic on Mac and Creating WebLogic domain

Filed Under: Java EE

Oracle Weblogic is one of the most widely used application servers. Recently I have installed it on Mac OS system and created a domain. This article is intended to provide the steps for installation and creating a domain and then starting and stopping domain with Terminal. I have set up Oracle Weblogic on my system but I am sure that the setup instructions will work for other versions also.

Prerequisite for Oracle Weblogic Server Installation

  1. Oracle Weblogic setup – You can download it from Oracle website for development purpose.
  2. JDK 6 – Oracle Weblogic 10.3 requires Java 6 and it comes with the default Mac OS system. You can check whether its installed or not. It will be in “/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home” directory.

Install Oracle Weblogic on Mac OS

Unzip the WebLogic installer in the hard drive. For my installation, I have unzipped it in “/weblogic/wls1033_dev” directory.

Steps to install Weblogic Server and creating a domain

Open Terminal and run the below commands in the sequence mentioned.

$ export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
$ export MW_HOME=/weblogic/wls1033_dev
$ cd $MW_HOME
$ ./
$ export USER_MEM_ARGS="-Xmx1024m -XX:PermSize=1024m"
$ . $MW_HOME/wlserver/server/bin/ (Note that there is a space between . and $)
$ mkdir /weblogic/domain1
$ cd /weblogic/domain1
$ JAVA_HOME/bin/java -Xmx1024m -XX:MaxPermSize=1024m weblogic.Server

The last command will create the domain and then start it with the default configuration. While setup, it will ask for the user and password to login to your domain admin console. After executing all the commands successfully, you can log in to WebLogic server admin console at https://localhost:7001/console with the same user and password.

Your Weblogic server and domain is up and running now. 馃檪

install oracle weblogic on mac os, oracle weblogic admin console

After that you can start and stop your domain from Terminal with and scripts found in domain bin directory. But if you will close the Terminal session and then try to execute the commands, it will throw below exception:

Starting WLS with line:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java    -Xms512m -Xmx512m -Dweblogic.Name=myserver   -da -Dplatform.home=/wlserver -Dwls.home=/wlserver/server -Dweblogic.home=/wlserver/server  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole=  weblogic.Server
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Server
Caused by: java.lang.ClassNotFoundException: weblogic.Server
	at Method)
	at java.lang.ClassLoader.loadClass(
	at sun.misc.Launcher$AppClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
	at java.lang.ClassLoader.loadClassInternal(

Above exception comes because the export command was only for the current Terminal session. To avoid these issues, you can include these in .bash_profile file in your home directory. If you don’t have this file then you can create it and then add below lines.

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
export MW_HOME=/weblogic/wls1033_dev
export USER_MEM_ARGS="-Xmx1024m -XX:PermSize=1024m"

After that save it and run command source ~/.bash_profile to set these variables. Since these are added in bash profile, it will get exported as system variable as soon as you launch your terminal.

If you found the article useful, please comment and share with others.


  1. Ganesh R says:

    Highly Useful.

Comments are closed.

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors