Its 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:
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09
set JRE_HOME=C:\Program Files\Java\jre7
set MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m
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.
(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.
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”