英文:
How to add self-signed certificate to Java truststore?
问题
如何在Java 14 jpackage中向Java信任存储中添加自签名证书?
英文:
I am trying jpackage Java 14 to package my Spring application,
I have requirement to self-sign certificate Java trust store, but I cannot find the keytool in the jpackage image.
How can I add a self-signed certificate to the Java truststore in Java 14 jpackage?
答案1
得分: 1
我得到了答案:
- 运行jlink命令以创建JRE
jdk-14.0.1/bin/jlink --add-modules java.sql,java.naming,java.base,java.logging,java.desktop,java.management,java.security.jgss,java.instrument --output myJRE
- 运行jpackage以创建镜像
jdk-14.0.1/bin/jpackage --type app-image --runtime-image myJRE --input target/ --name xxx-xxx-app --main-jar xxx-0.0.1.jar --java-options '-Dspring.config.location=/app/conf/application.properties'
英文:
I got the answer:
- Run jlink command to create JRE
jdk-14.0.1/bin/jlink --add-modules java.sql,java.naming,java.base,java.logging,java.desktop,java.management,java.security.jgss,java.instrument --output myJRE
- Run jpackage to create image
jdk-14.0.1/bin/jpackage --type app-image --runtime-image myJRE --input target/ --name xxx-xxx-app --main-jar xxx-0.0.1.jar --java-options '-Dspring.config.location=/app/conf/application.properties'
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论