mirror of https://github.com/apache/activemq.git
[AMQ-7087] Add JDK 9+ specific JVM args to avoid warnings
This commit is contained in:
parent
4991668549
commit
7db424758f
|
@ -323,11 +323,49 @@ invokeJar(){
|
|||
echo "INFO: changing to user '$ACTIVEMQ_USER' to invoke java"
|
||||
fi
|
||||
|
||||
# Get Java version
|
||||
# Use in priority xpg4 awk or nawk on SunOS as standard awk is outdated
|
||||
AWK=awk
|
||||
if ${solaris}; then
|
||||
if [ -x /usr/xpg4/bin/awk ]; then
|
||||
AWK=/usr/xpg4/bin/awk
|
||||
elif [ -x /usr/bin/nawk ]; then
|
||||
AWK=/usr/bin/nawk
|
||||
fi
|
||||
fi
|
||||
VERSION=`"${JAVACMD}" -version 2>&1 | ${AWK} -F '"' '/version/ {print $2}' | sed -e 's/_.*//g; s/^1\.//g; s/\..*//g; s/-.*//g;'`
|
||||
|
||||
# Execute java binary
|
||||
if [ -n "$TASK_TODO" ] && [ "$TASK_TODO" != "stop" ];then
|
||||
if [ -z "$ACTIVEMQ_OUT" ]; then
|
||||
ACTIVEMQ_OUT="/dev/null"
|
||||
fi
|
||||
if [ "${VERSION}" -gt "8" ]; then
|
||||
$EXEC_OPTION $DOIT_PREFIX "\"$JAVACMD\" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \
|
||||
--add-reads=java.xml=java.logging \
|
||||
--add-opens java.base/java.security=ALL-UNNAMED \
|
||||
--add-opens java.base/java.net=ALL-UNNAMED \
|
||||
--add-opens java.base/java.lang=ALL-UNNAMED \
|
||||
--add-opens java.base/java.util=ALL-UNNAMED \
|
||||
--add-opens java.naming/javax.naming.spi=ALL-UNNAMED \
|
||||
--add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED \
|
||||
--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED \
|
||||
--add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED \
|
||||
--add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED \
|
||||
--add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED \
|
||||
--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED \
|
||||
-Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
|
||||
-Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
|
||||
-Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
|
||||
-Dactivemq.conf=\"${ACTIVEMQ_CONF}\" \
|
||||
-Dactivemq.data=\"${ACTIVEMQ_DATA}\" \
|
||||
$ACTIVEMQ_CYGWIN \
|
||||
-jar \"${ACTIVEMQ_HOME}/bin/activemq.jar\" $COMMANDLINE_ARGS >> $ACTIVEMQ_OUT 2>&1 &
|
||||
RET=\"\$?\"; APID=\"\$!\";
|
||||
echo \$APID > "${PIDFILE}";
|
||||
echo \"INFO: pidfile created : '${PIDFILE}' (pid '\$APID')\";exit \$RET" $DOIT_POSTFIX
|
||||
RET="$?"
|
||||
else
|
||||
$EXEC_OPTION $DOIT_PREFIX "\"$JAVACMD\" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \
|
||||
-Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
|
||||
-Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
|
||||
|
@ -340,9 +378,23 @@ invokeJar(){
|
|||
echo \$APID > "${PIDFILE}";
|
||||
echo \"INFO: pidfile created : '${PIDFILE}' (pid '\$APID')\";exit \$RET" $DOIT_POSTFIX
|
||||
RET="$?"
|
||||
fi
|
||||
elif [ -n "$TASK_TODO" ] && [ "$TASK_TODO" = "stop" ];then
|
||||
SPID="`cat "${PIDFILE}"`"
|
||||
if [ "${VERSION}" -gt "8" ]; then
|
||||
$EXEC_OPTION $DOIT_PREFIX "\"$JAVACMD\" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \
|
||||
--add-reads=java.xml=java.logging \
|
||||
--add-opens java.base/java.security=ALL-UNNAMED \
|
||||
--add-opens java.base/java.net=ALL-UNNAMED \
|
||||
--add-opens java.base/java.lang=ALL-UNNAMED \
|
||||
--add-opens java.base/java.util=ALL-UNNAMED \
|
||||
--add-opens java.naming/javax.naming.spi=ALL-UNNAMED \
|
||||
--add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED \
|
||||
--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED \
|
||||
--add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED \
|
||||
--add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED \
|
||||
--add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED \
|
||||
--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED \
|
||||
-Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
|
||||
-Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
|
||||
-Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
|
||||
|
@ -355,6 +407,32 @@ invokeJar(){
|
|||
RET="$?"
|
||||
else
|
||||
$EXEC_OPTION $DOIT_PREFIX "\"$JAVACMD\" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \
|
||||
-Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
|
||||
-Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
|
||||
-Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
|
||||
-Dactivemq.conf=\"${ACTIVEMQ_CONF}\" \
|
||||
-Dactivemq.data=\"${ACTIVEMQ_DATA}\" \
|
||||
$ACTIVEMQ_CYGWIN \
|
||||
-jar \"${ACTIVEMQ_HOME}/bin/activemq.jar\" $COMMANDLINE_ARGS --pid $SPID &
|
||||
RET=\"\$?\"; APID=\"\$!\";
|
||||
echo \$APID > "${PIDFILE}.stop"; exit \$RET" $DOIT_POSTFIX
|
||||
RET="$?"
|
||||
fi
|
||||
else
|
||||
if [ "${VERSION}" -gt "8" ]; then
|
||||
$EXEC_OPTION $DOIT_PREFIX "\"$JAVACMD\" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \
|
||||
--add-reads=java.xml=java.logging \
|
||||
--add-opens java.base/java.security=ALL-UNNAMED \
|
||||
--add-opens java.base/java.net=ALL-UNNAMED \
|
||||
--add-opens java.base/java.lang=ALL-UNNAMED \
|
||||
--add-opens java.base/java.util=ALL-UNNAMED \
|
||||
--add-opens java.naming/javax.naming.spi=ALL-UNNAMED \
|
||||
--add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED \
|
||||
--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED \
|
||||
--add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED \
|
||||
--add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED \
|
||||
--add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED \
|
||||
--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED \
|
||||
-Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
|
||||
-Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
|
||||
-Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
|
||||
|
@ -363,6 +441,17 @@ invokeJar(){
|
|||
$ACTIVEMQ_CYGWIN \
|
||||
-jar \"${ACTIVEMQ_HOME}/bin/activemq.jar\" $COMMANDLINE_ARGS" $DOIT_POSTFIX
|
||||
RET="$?"
|
||||
else
|
||||
$EXEC_OPTION $DOIT_PREFIX "\"$JAVACMD\" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \
|
||||
-Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
|
||||
-Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
|
||||
-Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
|
||||
-Dactivemq.conf=\"${ACTIVEMQ_CONF}\" \
|
||||
-Dactivemq.data=\"${ACTIVEMQ_DATA}\" \
|
||||
$ACTIVEMQ_CYGWIN \
|
||||
-jar \"${ACTIVEMQ_HOME}/bin/activemq.jar\" $COMMANDLINE_ARGS" $DOIT_POSTFIX
|
||||
RET="$?"
|
||||
fi
|
||||
fi
|
||||
return $RET
|
||||
}
|
||||
|
|
|
@ -24,6 +24,10 @@ set.default.ACTIVEMQ_HOME=../..
|
|||
set.default.ACTIVEMQ_BASE=../..
|
||||
set.default.ACTIVEMQ_CONF=%ACTIVEMQ_BASE%/conf
|
||||
set.default.ACTIVEMQ_DATA=%ACTIVEMQ_BASE%/data
|
||||
|
||||
# if you use JDK 9+, uncomment the following
|
||||
#set.JDK_JAVA_OPTIONS=--add-reads=java.xml=java.logging --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.naming/javax.naming.spi=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED
|
||||
|
||||
wrapper.working.dir=.
|
||||
|
||||
# Java Application
|
||||
|
|
|
@ -24,6 +24,10 @@ set.default.ACTIVEMQ_HOME=../..
|
|||
set.default.ACTIVEMQ_BASE=../..
|
||||
set.default.ACTIVEMQ_CONF=%ACTIVEMQ_BASE%/conf
|
||||
set.default.ACTIVEMQ_DATA=%ACTIVEMQ_BASE%/data
|
||||
|
||||
# if you use JDK 9+, uncomment the following
|
||||
#set.JDK_JAVA_OPTIONS=--add-reads=java.xml=java.logging --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.naming/javax.naming.spi=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED
|
||||
|
||||
wrapper.working.dir=.
|
||||
|
||||
# Java Application
|
||||
|
|
|
@ -24,6 +24,10 @@ set.default.ACTIVEMQ_HOME=../..
|
|||
set.default.ACTIVEMQ_BASE=../..
|
||||
set.default.ACTIVEMQ_CONF=%ACTIVEMQ_BASE%/conf
|
||||
set.default.ACTIVEMQ_DATA=%ACTIVEMQ_BASE%/data
|
||||
|
||||
# if you use JDK 9+, uncomment the following
|
||||
#set.JDK_JAVA_OPTIONS=--add-reads=java.xml=java.logging --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.naming/javax.naming.spi=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED
|
||||
|
||||
wrapper.working.dir=.
|
||||
|
||||
# Java Application
|
||||
|
|
|
@ -24,6 +24,10 @@ set.default.ACTIVEMQ_HOME=../..
|
|||
set.default.ACTIVEMQ_BASE=../..
|
||||
set.default.ACTIVEMQ_CONF=%ACTIVEMQ_BASE%/conf
|
||||
set.default.ACTIVEMQ_DATA=%ACTIVEMQ_BASE%/data
|
||||
|
||||
# if you use JDK 9+, uncomment the following
|
||||
#set.JDK_JAVA_OPTIONS=--add-reads=java.xml=java.logging --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.naming/javax.naming.spi=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED
|
||||
|
||||
wrapper.working.dir=.
|
||||
|
||||
# Java Application
|
||||
|
|
|
@ -24,6 +24,10 @@ set.default.ACTIVEMQ_HOME=../..
|
|||
set.default.ACTIVEMQ_BASE=../..
|
||||
set.default.ACTIVEMQ_CONF=%ACTIVEMQ_BASE%/conf
|
||||
set.default.ACTIVEMQ_DATA=%ACTIVEMQ_BASE%/data
|
||||
|
||||
# if you use JDK 9+, uncomment the following
|
||||
#set.JDK_JAVA_OPTIONS=--add-reads=java.xml=java.logging --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.naming/javax.naming.spi=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED
|
||||
|
||||
wrapper.working.dir=.
|
||||
|
||||
# Java Application
|
||||
|
|
Loading…
Reference in New Issue