我在将jpackage创建的应用程序连接到websocket端点时遇到问题。通过我的IDE运行时协商的密码在构建的映像中不可用。看起来我遇到了这里描述的问题:https://www.gubatron.com/blog/2019/04/25/solving-received-fatal-alert-handshake_failure-error-when-performing-https-connections-on-a-custom-made-jre-with-jlink/
我现在正在尝试将jdk.crypto.cryptoki添加到我的jpackage中,但无法做到。
我第一次试过这个
runtime {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
jpackage {
imageName = 'MyCorpDashboard'
installerName = 'MyCorpInstaller'
appVersion = '0.1.0'
if(org.gradle.internal.os.OperatingSystem.current().windows) {
jpackageHome = 'D:\\Java\\jdk-14' // Needs to be JDK 14
installerType = 'exe'
jvmArgs = ['-Djava.security.debug=access,stack',
'-Dhttps.protocols=SSLv2,TLSv1.2',
'-Djavax.net.debug=ssl:handshake:verbose'
'--add-modules', 'jdk.crypto.cryptoki']
imageOptions = ['--win-console', '--icon','src/main/resources/com/mycorp/ui/dashboard/icon_wh.ico']
installerOptions = ['--win-per-user-install',
'--win-dir-chooser',
'--win-menu',
'--win-shortcut',
'--vendor', 'My Corp']
} else if (org.gradle.internal.os.OperatingSystem.current().macOsX) {
jpackageHome = '/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/' // Needs to be JDK 14
imageOptions = ['--vendor', 'My Corp',
'--icon','src/main/resources/com/mycorp/ui/dashboard/icon_wh.icns']
}
}
}但是get
Error occurred during initialization of boot layer
java.lang.module.FindException: Module jdk.crypto.cryptoki not found我也试过了
compileJava {
options.compilerArgs += ["--add-modules", "jdk.crypto.cryptoki"]
}这也不起作用。
如何添加此模块以便将其打包到我的应用程序中?
发布于 2020-07-14 08:52:50
oi -在发布后,我想我现在看到了它,在运行时下(在重新访问https://badass-runtime-plugin.beryx.org/releases/latest/之后)
runtime {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
modules = ['jdk.crypto.cryptoki']
jpackage {
imageName = 'MyCorpDashboard'
installerName = 'MyCorpInstaller'
appVersion = '0.1.0'
if(org.gradle.internal.os.OperatingSystem.current().windows) {
jpackageHome = 'D:\\Java\\jdk-14' // Needs to be JDK 14
installerType = 'exe'
jvmArgs = ['-Djava.security.debug=access,stack',
'-Dhttps.protocols=SSLv2,TLSv1.2',
'-Djavax.net.debug=ssl:handshake:verbose']
imageOptions = ['--win-console', '--icon','src/main/resources/com/mycorp/ui/dashboard/icon_wh.ico']
installerOptions = ['--win-per-user-install',
'--win-dir-chooser',
'--win-menu',
'--win-shortcut',
'--vendor', 'My Corp']
} else if (org.gradle.internal.os.OperatingSystem.current().macOsX) {
jpackageHome = '/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/' // Needs to be JDK 14
imageOptions = ['--vendor', 'My Corp',
'--icon','src/main/resources/com/mycorp/ui/dashboard/icon_wh.icns']
}
}
}https://stackoverflow.com/questions/62886366
复制相似问题