Monday, June 28, 2010

Changing the java version on an OC4J instance

We are working with Oracle Application Server 10.1.2, which ships with java 1.4. This is getting a little old and outdated. The customer does not plan on updating any time soon (if it ain't broke don't fix it) .  The developers of my team want to write java 1.6 ! So how do you change the java version that runs an OC4J instance? Here's the scoop:
  1. Install the latest jdk or jre on your Oracle Application Server machine.
  2. Access the OAS web based Application Server Control and click on the OC4J instance you want to change.
  3. Click on Server Properties and scroll down to "Command Line Options'" and enter in the "Java Executable" field the path to the java installation.
  4. Open the application.xml file under the config directory of your OC4J instance (use vi if on UNIX, notepad if on windows) and add the library directory of the new java jdk/jre instalation under the libary path entries:

    Example:
    <library path="/usr/java/jre1.6.0_16/lib">
     
That should be it. Your application now runs under the java executable you specified at step#3

No comments:

Post a Comment