我正在使用args执行java命令行,我的命令看起来像这样。
/home/test/jdk1.6.0_30/jre/bin/java -Dweblogic.security.SSL.trustedCAKeyStore=/scratch/montrust/Trust.jks -cp /scratch/archives/abc.jar:/scratch/wls1036/middleware/wlserver_10.3/server/lib/weblogic.jar:/scratch//wls1036/middleware/Oracle_OSB1/lib/sb-kernel-api.jar:/scratch/wls1036/middleware/Oracle_OSB1/lib/sb-kernel-impl.jar:/scratch/gangg/wls1036/middleware/Oracle_OSB1/modules/com.bea.common.configfwk_1.6.0.0.jar test.home.OSBResourceImportUtil /scratch/Farm02_base_domain/base_domain/HelloWorld.jar host.xyz.com 7771 weblogic true true true true true null 11.1.1.6 t3s
我在执行
时遇到错误Exception in thread "main" java.lang.NoClassDefFoundError: -Dweblogic/security/SSL/trustedCAKeyStore=/scratch/montrust/Trust.jks
Caused by: java.lang.ClassNotFoundException: -Dweblogic.security.SSL.trustedCAKeyStore=.scratch.agentHome.osbssl.agent_inst.sysman.config.montrust.AgentTrust.jks
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: -Dweblogic.security.SSL.trustedCAKeyStore=/scratch/agentHome/osbssl/agent_inst/sysman/config/montrust/AgentTrust.jks.
答案 0 :(得分:0)
您尝试在双引号中添加属性值吗?如下所示
/home/test/jdk1.6.0_30/jre/bin/java -Dweblogic.security.SSL.trustedCAKeyStore="/scratch/montrust/Trust.jks"