简体   繁体   English

使用SSL证书触发器运行Tomcat服务器无法找到或加载主类cert.pkcs12

[英]Running Tomcat server with SSL certificate triggers could not find or load main class cert.pkcs12

I've been following this guide to setup SSL certificate on my Tomcat server. 我一直遵循本指南在Tomcat服务器上设置SSL证书。 https://docs.oracle.com/cd/E29585_01/PlatformServices.61x/security/src/tsec_ssl_jsp_pkcs12.html https://docs.oracle.com/cd/E29585_01/PlatformServices.61x/security/src/tsec_ssl_jsp_pkcs12.html

When I try to run the .bat file with there mentioned parameters (with my pwd): 当我尝试使用提到的参数(使用我的pwd)运行.bat文件时:

-Djavax.net.ssl.keyStoreType=PKCS12 
-Djavax.net.ssl.keyStore=%CLIENT_CERT% 
-Djavax.net.ssl.keyStorePassword=endeca 
-Djavax.net.ssl.trustStore=%CLIENT_CERT% 
-Djavax.net.ssl.trustStorePassword=endeca

I get this error at the startup: 我在启动时收到此错误:

Error: Could not find or load main class Files\Java\jre7\lib\security\cert.pkcs12

Any idea what am I doing wrong? 知道我在做什么错吗?

The issue is caused by the space in java installation path C:\\Program Files\\Java . 此问题是由Java安装路径C:\\Program Files\\Java的空格引起的。 Install java into a path without spaces will resolve the issue. 将Java安装到没有空格的路径中将解决此问题。

Update 更新资料

Add quotes around the path solve also the issue. 在路径周围添加引号也可以解决该问题。 Thanks @Ondrej 谢谢@Ondrej

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM