Use custom JRE for Wildfly 10

帅比萌擦擦* 提交于 2019-12-23 16:53:30

问题


Can I choose a custom JRE for a Wildfly Application Server with a property like standalone.bat -Djava.jre=<path>

For my project, it is important that I can't change the value of parameter JAVA_HOME


回答1:


You can set the JAVA_HOME used by WildFly.

For Linux/UNIX, check the standalone.conf file:

# Specify the location of the Java home directory.  If set then $JAVA will
# be defined to $JAVA_HOME/bin/java, else $JAVA will be "java".
#
#JAVA_HOME="/opt/java/jdk"

For Windows, check the standalone.conf.bat file:

rem #
rem # Specify the location of the Java home directory (it is recommended that
rem # this always be set). If set, then "%JAVA_HOME%\bin\java" will be used as
rem # the Java VM executable; otherwise, "%JAVA%" will be used (see below).
rem #
rem set "JAVA_HOME=C:\opt\jdk1.6.0_23"

Simply uncomment the line that sets the JAVA_HOME variable and update its value with the desired path.




回答2:


You might run

JAVA_HOME=/path/to/Java bin/standalone.sh

Or the Windows variant of it. This is similar to change the standalone start script. The JAVA_HOME variable will take only effect to the started process. Every other open shell window will see the original JAVA_HOME



来源:https://stackoverflow.com/questions/39472217/use-custom-jre-for-wildfly-10

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!