From 2a25d38cdea87a07971d8025854dc97f0ce0906f Mon Sep 17 00:00:00 2001 From: DedunuKarunarathne <46235093+DedunuKarunarathne@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:32:18 +0530 Subject: [PATCH] Fix file connector issue with JDK 17. Introduced add-opens conditions to the startup script in order to fix the file connector issue with JDK 17. Fixes: https://github.com/wso2/micro-integrator/issues/3303 --- distribution/src/scripts/micro-integrator.bat | 2 +- distribution/src/scripts/micro-integrator.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/src/scripts/micro-integrator.bat b/distribution/src/scripts/micro-integrator.bat index f46c0d143b..5fc3b2a94d 100644 --- a/distribution/src/scripts/micro-integrator.bat +++ b/distribution/src/scripts/micro-integrator.bat @@ -181,7 +181,7 @@ cd .. rem ---------- Add jars to classpath --c _CLASSPATH% if %JAVA_VERSION% GEQ 110 set CARBON_CLASSPATH=.\wso2\lib\*;%CARBON_CLASSPATH% -if %JAVA_VERSION% GEQ 110 set JAVA_VER_BASED_OPTS=--add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED +if %JAVA_VERSION% GEQ 110 set JAVA_VER_BASED_OPTS=--add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED rem ---------------- Setting default profile for Runtime if not parsed -------------- diff --git a/distribution/src/scripts/micro-integrator.sh b/distribution/src/scripts/micro-integrator.sh index 53bef1f8dd..2936e17629 100644 --- a/distribution/src/scripts/micro-integrator.sh +++ b/distribution/src/scripts/micro-integrator.sh @@ -280,7 +280,7 @@ fi JAVA_VER_BASED_OPTS="" if [ $java_version_formatted -ge 1100 ]; then - JAVA_VER_BASED_OPTS="--add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED" + JAVA_VER_BASED_OPTS="--add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED" fi # start diagnostic tool in background in diagnostic-tool/bin/diagnostic