Skip to content

Commit 31b601a

Browse files
author
Santiago Gala
committed
For jdk 17+ needs to allow access to sun.security.util
TODO: upgrade to ApacheDS version compatible with jdk17
1 parent 5c77d91 commit 31b601a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

core/src/main/groovy/noe/server/ApacheDS.groovy

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import noe.common.newcmd.CmdBuilder
55
import noe.common.newcmd.CmdCommand
66
import noe.common.utils.Cmd
77
import noe.common.utils.JBFile
8+
import noe.common.utils.Java
9+
810
/**
911
* Class for manipulting with ApacheDS server
1012
* - Pure java LDAP, Kerberos server
@@ -62,6 +64,14 @@ abstract class ApacheDS extends ServerAbstract {
6264
opts+='-Dcom.redhat.fips=false'
6365
cmdProps.put("JAVA_OPTS", opts)
6466
}
67+
if(Java.isJdkXOrHigher("17")) {
68+
def opts = cmdProps.getOrDefault("JAVA_OPTS", "")
69+
if (opts.size() > 0) {
70+
opts += ' '
71+
}
72+
opts += '--add-exports=java.base/sun.security.util=ADD-UNNAMED'
73+
cmdProps.put("JAVA_OPTS", opts)
74+
}
6575
process = Cmd.startProcess(cmdCommand)
6676
process.consumeProcessOutput(System.out, System.err)
6777
waitForStartComplete()

0 commit comments

Comments
 (0)