Specifying Java Options for a WebLogic Server Instance

Starting and Stopping Servers 2-17

2.15.3 Specifying Java Options for a WebLogic Server Instance

You use Java options to configure operating parameters for the JVM that runs a WebLogic Server instance. For example, you use Java options to tune the performance and monitoring capabilities of the JRockit JVM. You can also use Java options to override a servers configuration temporarily. The Java options apply only to the current instance of the server. They are not saved in the domains config.xml file and they are not visible from the Administration Console. For example, if a server is configured to listen on port 7201, you can use a Java option to start the server so that it listens on port 7555. The Administration Console will still indicate that the server is configured to listen on port 7201. If you do not use the Java option the next time you start the server, it will listen on port 7201. If you use a WebLogic Server script to start servers, do the following. If you use the Node Manager to start servers, see Set Java options for servers started by Node Manager in the Oracle WebLogic Server Administration Console Help. 1. Create a backup copy of the WebLogic Server start scripts: ■ For scripts that start an Administration Server, back up DOMAIN_ NAME\bin\startWebLogic.cmd startWebLogic.sh on UNIX ■ For scripts that start a Managed Server, back up DOMAIN_ NAME\bin\startManagedWebLogic.cmd startManagedWebLogic.sh on UNIX where DOMAIN_NAME is the name of the directory in which you located the domain. By default, this directory is MW_HOME\user_ projects\domains\DOMAIN_NAME . 2. Open the start script in a text editor. 3. Edit the set JAVA_OPTIONS command to specify the Java options. If you specify multiple options, separate each option by a space, and place quotes around the entire set of options. For example:

4. set JAVA_OPTIONS=-Xgc:gencopy -Xns:30

For more information, see: ■ weblogic.Server Command-Line Reference for information on the Java options that set run-time behavior of a WebLogic Server instance. ■ Using Oracle JRockit JDK for information on the Java options that the JRockit Virtual Machine supports. ■ The documentation that the JVM vendor provides for information on the Java options that other JVMs support. 5. Save the start script. 6. Start the server.

2.15.4 Changing the JVM That Runs Servers