You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2017/07/27 13:00:08 UTC
[jira] [Commented] (KARAF-4985) Karaf does not start with JDK 9 in
Windows
[ https://issues.apache.org/jira/browse/KARAF-4985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16103179#comment-16103179 ]
Jean-Baptiste Onofré commented on KARAF-4985:
---------------------------------------------
In the Unix {{karaf}} script, we test the JDK version and use different command line argument for Java 9 and previous version:
{code}
if [ "${VERSION}" -gt "80" ]; then
${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \
--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-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=java.xml.bind/com.sun.xml.internal.bind.v2.runtime=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 \
--add-modules java.xml.ws.annotation,java.corba,java.transaction,java.xml.bind,java.xml.ws \
-Dkaraf.instances="${KARAF_HOME}/instances" \
-Dkaraf.home="${KARAF_HOME}" \
-Dkaraf.base="${KARAF_BASE}" \
-Dkaraf.data="${KARAF_DATA}" \
-Dkaraf.etc="${KARAF_ETC}" \
-Dkaraf.restart.jvm.supported=true \
-Djava.io.tmpdir="${KARAF_DATA}/tmp" \
-Djava.util.logging.config.file="${KARAF_BASE}/etc/java.util.logging.properties" \
${KARAF_SYSTEM_OPTS} \
${KARAF_OPTS} \
${OPTS} \
-classpath "${CLASSPATH}" \
${MAIN} "$@"
else
${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \
-Djava.endorsed.dirs="${JAVA_ENDORSED_DIRS}" \
-Djava.ext.dirs="${JAVA_EXT_DIRS}" \
-Dkaraf.instances="${KARAF_HOME}/instances" \
-Dkaraf.home="${KARAF_HOME}" \
-Dkaraf.base="${KARAF_BASE}" \
-Dkaraf.data="${KARAF_DATA}" \
-Dkaraf.etc="${KARAF_ETC}" \
-Dkaraf.restart.jvm.supported=true \
-Djava.io.tmpdir="${KARAF_DATA}/tmp" \
-Djava.util.logging.config.file="${KARAF_BASE}/etc/java.util.logging.properties" \
${KARAF_SYSTEM_OPTS} \
${KARAF_OPTS} \
${OPTS} \
-classpath "${CLASSPATH}" \
${MAIN} "$@"
fi
{code}
Unfortunately, it has not been apply to {{karaf.bat}} script.
I'm fixing.
> Karaf does not start with JDK 9 in Windows
> -------------------------------------------
>
> Key: KARAF-4985
> URL: https://issues.apache.org/jira/browse/KARAF-4985
> Project: Karaf
> Issue Type: Bug
> Components: karaf-os-integration
> Affects Versions: 4.1.0
> Environment: Windows 7, Java 9 (JDK and JRE 9 - ea+156)
> Reporter: Lijun Liao
> Assignee: Jean-Baptiste Onofré
> Fix For: 4.2.0, 4.1.2
>
>
> Under JDK / JRE 9 (tested with ea+156) in Windows 7, karaf does not start
> Steps to reproduce the problem:
> 1. Start karaf {code}bin/karaf{code} and you will get the following error
> {code}
> -Djava.endorsed.dir=C:\Program Files\Java\jdk-9\jre\lib\endorsed:C:\Program Files\Java\jdk-9\lib\endorsed:D:\apache-karaf-4.1.0\bin\..\lib\endorsed is not supported. Endorsed standards and standalone APIs
> in modular form will be supported via the concept of upgradeable modules.
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)