About the problem of replacing jdk with weblogic11g

The default jdk version of weblogic here is jdk1.6, and both jdk1.6 and 1.7 are installed on the server. Then the version of the jdk used for development is 1.7. Although it is also very old, but there is no way, now we are indeed using jdk1.7 for development. In such an environment, how do we find and replace the default jdk of weblogic? Through Baidu and your own hands-on try, then the specific operation steps are as follows:

  1. Log in to the server account and enter the command line
rpm -qa|grep jdk

This way all jdk installed by the server can be seen.

java-1.7-openjdk-devel-1.7.0.65-2.5.1.2.e16_5.x86_64

2. Then find the installation path of jdk1.7, copy the name of the jdk found above

rpm -ql java-1.7-openjdk-devel-1.7.0.65-2.5.1.2.e16_5.x86_64

3. Find the last folder named bin is the installation path of jdk1.7

/usr/lib/jvm/java-1.7-openjdk-devel-1.7.0.65-2.5.1.2.e16_5.x86_64/bin

4. Open the installation directory of weblogic and find startWebLogic.sh. There is such a line of code in the interface:

${JAVA_HOME}/bin/java/ ${JAVA_VM} -version

5. Redefine the path of JAVA_HOME before this line of code

export JAVA_HOME=/usr/lib/jvm/java-1.7-openjdk-devel-1.7.0.65-2.5.1.2.e16_5.x86_64/bin

6. Then restart weblogic, you will find that the jdk version of weblogic has become 1.7. Then add the jdk1.7 compiled project in the console is normal. Otherwise, if it is compiled in 1.7, an error will be reported on the server.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325819303&siteId=291194637