How to install Weblogic 12C Server Instance as an window service on Window7

m1975414Its very important sometimes to set up a software application as an window service on Window Platform.Window service enable  a software application to start working

as soon as Machine is turned on so that no manual or human interaction is required to start that application whenever machine is turned on.In this article i will show how

to install weblogic 12 c server as an window service on  Window 7 platform.After installing weblogic 12c server on the machine,Perform the following steps to make it as

an window service.

(1.)  After installing the web logic 12c  server ,Its installation directory will be in C drive. Path will be like C:\Oracle\Middleware .Its Tree structure would be like:


(2.) Go to the C:\Oracle\Middleware\wlserver_12.1\server\bin.Create a file createSvc.cmd.Add the below content in this file:

echo off


set DOMAIN_NAME=base_domain

set USERDOMAIN_HOME=C:\Oracle\Middleware\user_projects\domains\base_domain

set SERVER_NAME=AdminServer


set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09

set JRE_HOME=C:\Program Files\Java\jre7

set HOST=

set PORT=7001




_stdout.txt” -Dweblogic.Stderr=”C:\Oracle\Middleware\user_projects\domains\base_domain_


set JAVA_VENDOR=”sun”

set JAVA_VM=-server

set MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m

call “C:\Oracle\Middleware\wlserver_12.1\server\bin\installSvc.cmd”


Details of the above script is:

SETLOCAL :-This is a batch command that begins the localization of environment variables in a batch file.


where domain-name is the name of your WebLogic Server domain.


where absolute-pathname is the absolute pathname of the Administration Server’s root directory (the directory that contains the domain’s configuration file).


where server-name is the name of an existing server instance that you want set up as a Windows service.


When the PRODUCTION_MODE variable is set to true, the server instance starts in production mode.

JAVA_HOME  – Location of the version of Java used to start WebLogic Server. This variable must point to the root directory of a   JDK installation and will be set for you by the installer.

JRE_HOME—Location of system java run time environment

HOST – IP address of the Weblogic Server.

PORT – Port number where the WebLogic Server is listening for requests.

JAVA_OPTIONS – Java command-line options for running the server. (These  will be tagged on to the end of the JAVA_VM and MEM_ARGS).

JAVA_VENDOR– Java vendor name which is used for running weblogic server.

JAVA_VM   – The java arg specifying the VM to run.  (i.e. -server,  -client, etc.).

MEM_ARGS  – The variable to override the standard memory arguments passed to java

(3.)  Add the WebLogic server bin directory (C:\Oracle\Middleware\wlserver_12.1\server\bin)to the system path variable (PATH).

(4.)  Execute createSvc.cmd script from same folder C:\Oracle\Middleware\wlserver_12.1\server\bin

(5.) This should create service with name of ” wlsvc base_domain_AdminServer ” in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servicesas below:


(6.) Right Click on Computer and then click on manage.Now go to Services and Applications->Services. “wlsvc base_domain_AdminServer service” is listed there as shown below:


Now start the service by clicking on start button.

How to remove server instance as a windows service:

(1.) Create a script called removeSvc.cmd and copy the following lines. Make sure adminServer name and domain name values are correctly set. And execute from the same place

(C:\Oracle\Middleware\wlserver_12.1\server\bin) where you created window service before.

echo off


set DOMAIN_NAME=base_domain

set SERVER_NAME=AdminServer

call “C:\Oracle\Middleware\wlserver_12.1\server\bin\uninstallSvc.cmd”


How to debug the Window Service:

If there are some issue in running this window service.We can debug it as well.

Go to theC:\Oracle\Middleware\wlserver_12.1\server\bin directory and run below command:

wlsvc   –debug  “wlsvc base_domain_AdminServer


2 thoughts on “How to install Weblogic 12C Server Instance as an window service on Window7

  1. Simply wish to say your article is as astonishing.
    The clearness on your put up is simply nice and that i can assume you are an expert in this subject.
    Fine together with your permission let me to clutch your feed to
    keep up to date with approaching post. Thanks a million and please carry on the gratifying work.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s