How To Install OC4J Standalone Distribution


This document describes how to install, start, test and stop Oracle Application Server Containers for J2EE (OC4J) server on windows machine


About OC4J Standalone Distribution

The Oracle Application Server Containers for J2EE (OC4J) standalone distribution provides a complete J2EE server environment, distributed as a simple zip file. The OC4J standalone distribution includes an HTTP(S) server, the required J2EE services, and Web Services capabilities all of which are executed from one Java process.


In order to use OC4J standalone, you must have a Java2 Standard Edition (J2SE) version 1.3.1 or later installed on your system. To download Java(TM) 2 SDK, Standard Edition 1.4.2_05, go to site and click on 'Download J2SE SDK' link

A copy of J2SE version 1.4.2_05 (j2sdk-1_4_2_05-windows-i586-p.exe) is also available at

Install OC4J Server

Start OC4J Server

Start OC4J server by changing to the J2EE_HOME directory and issuing one of 
the following commands:

1. Starts OC4J using the default configuration files, which are located in the 
j2ee/home/config directory.

    > cd 
    > java -jar oc4j.jar

2. Start OC4J using the server.xml file located in /mypath.

    > cd 
    > java -jar oc4j.jar -config /mypath/server.xml

The server outputs an initialization string with the version number when it
is ready to accept requests. For example:

    Oracle Application Server Containers for J2EE 10g ( initalized

Test OC4J Server

To test if OC4J server is up and runing, hit http://localhost:8888/ with your favorite browser.There are a couple of sample links at the bottom of the page that run JSP and Servlet sample applications.

If you changed the default port number (8888) in the http-web-site.xml file, access the Web server using http://localhost: where is the value you specified for the element.

Stop OC4J Server

To stop OC4J press ^c (Ctrl+c) in the window where the process was started, or by using the shutdown command in the admin.jar command-line utility (described in Miscellaneous Command-Line Utility section).

Miscellaneous Command-Line Utility

OC4J provides a command-line utility called admin.jar that can be used
to perform operations on a running OC4J instance. Among other things,
you can use admin.jar to restart and stop OC4J, deploy applications, and
gather information on current resource usage.

The admin.jar utility uses RMI to connect to a running OC4J process.
This means OC4J must be started before using admin.jar. OC4J can't be
started using admin.jar.

The admin.jar utility is exercised using the following command:

    > java -jar admin.jar ormi://: 

   - The oc4j_ormi_port defaults to 23791 and can be omitted if not changed.

   - The admin_id defaults to admin (configurable in principals.xml).

   - The admin_password is the password you configured during the basic
     installation section.

To see all of the available options, use the -help option.

Example usages of admin.jar 

To restart OC4J using admin.jar execute the following command from the

    > java -jar admin.jar ormi://: 

To shut down OC4J using admin.jar execute the following command:

    > java -jar admin.jar ormi://: 

This command provides a graceful shutdown of the container. If it does
not shut down the container, you can force a rapid shutdown by passing
the -force argument, as follows:

    > java -jar admin.jar ormi://: 
       -shutdown force

If you have any questions or comments, please contact Reza Nabi at