Running Weblogic with specified JDK

Hi,

Concretely I want to configure Weblogic to run with java8 and as well with java7 but i can't find a way to specify this in IntelliJ.

It picks up the defaut OS java version.

Do you know if it is possible to create several server configrations that might run with different JDK's?


Thanks
1 comment
Comment actions Permalink

Hello,

For other app server you would need to change JAVA_HOME passed to the server script, and IDEA provides you with
"Environment Variables" section of the run configuration to pass environment variables (including JAVA_HOME) to the server startup script.

But for this specific case WL has an additional logic which IDEA can't change, so some more tricks are required.

WebLogic default startup script overrides any value of the passed JAVA_HOME and sets JAVA_HOME to one bundled with the WebLogic JDK, chosen on server installation.
The corresponding logic is in setDomainEnv.sh (.cmd) and commEnv.sh (.cmd) scripts.



So, you may need to first comment out all the lines affecting JAVA_HOME in these scritps, and than set JAVA_HOME in the IDEA run configuration.
Some details could be found here: http://www.baigzeeshan.com/2012/05/how-to-change-jdk-used-by-weblogic.html.

IDEA don't want to (and in general can't reliably) modify the above scripts, so in contrast to other servers like Tomcat or JBoss IDEA does not provide you with Alternative JRE option for WL run-configs.

Hope that helps,

0

Please sign in to leave a comment.