Change JDK and configuration of new JDK in Weblogic Server
Install the New JDK
Steps:
Download the JDK:Obtain the desired JDK version (e.g., JRockit) from the official Oracle Technology Network (OTN).
Transfer the Installer:Use FTP or another method to transfer the installer to your server.
Set Permissions and Install:Make the installer executable
chmod 755 jrockit-jdk1.6.0_29-R28.2.2-4.1.0-linux-x64.bin
Run the installer:
./jrockit-jdk1.6.0_29-R28.2.2-4.1.0-linux-x64.bin
Install the JDK to your desired location,
e.g.,
/u01/Oracle/jrockit-r28.2.2
2.Update WebLogic Configuration to Use the New JDK
Steps:
Shutdown WebLogic Servers:Ensure all managed servers in the WebLogic domain are stopped.
Backup Configuration Files:Navigate to the domain's bin
directory
cd /u01/Oracle/Middleware/user_projects/domains/<domain_name>/bincp setDomainEnv.sh setDomainEnv.sh.bak
Open the file in a text editor.
Locate and comment out existing JAVA_HOME
and JAVA_VENDOR
settings:
Navigate to the WebLogic common bin
directory:
cd /u01/Oracle/Middleware/wlserver_10.3/common/bincp commEnv.sh commEnv.sh.bakEdit setDomainEnv.sh
:
Add the new JDK settings:
JAVA_HOME="/u01/Oracle/jrockit-r28.2.2"export JAVA_HOMEJAVA_VENDOR="Oracle"export JAVA_VENDOR
Locate the EXTRA_JAVA_PROPERTIES
section and remove the -Djrockit.optfile
property if present
Edit commEnv.sh
:Open the file in a text editor.Find the section checking for JAVA_HOME
and JAVA_VENDOR
if [ -z "${JAVA_HOME}" -o -z "${JAVA_VENDOR}" ]; then
Add the new JDK settings after this section:
JAVA_HOME="/u01/Oracle/jrockit-r28.2.2"export JAVA_HOMEJAVA_VENDOR="Oracle"export JAVA_VENDOR
Restart WebLogic Servers:
Start the Admin Server:
Use the appropriate script to start the Admin Server.
Verify the JDK Change:
Run the following command to check if the Admin Server is using the new JDK:
ps -ef | grep Admin
Start Managed Servers:
Once the Admin Server is confirmed to be running with the new JDK, start the managed servers.
Comments
Post a Comment