Coherence: Error: Could not find or load main clas

2019-09-03 17:41发布

Am newbie to oracle coherence, trying to start coherence instance with below configuration but get this error:

java -cp COHERENCE_HOME\config;COHERENCE_HOME\lib\coherence.jar com.tangosol.net.DefaultCacheServer
Error: Could not find or load main class com.tangosol.net.DefaultCacheServer

Environment: Java 1.7.17, configured as:
JAVA_HOME=JAVA_HOME=C: \Program Files\Java\jdk1.7.0_17
JRE_HOME=C:\Program Files\Java\jdk1.7.0_17\jre
COHERENCE_HOME=C:\coherence-java-3.7.1.0b27797\coherence

Tried multiple options but could not get much help to resolve this.

Error: Could not find or load main class com.tangosol.net.DefaultCacheServer

1条回答
【Aperson】
2楼-- · 2019-09-03 18:33

If you are using Windows, System variables are to be used as %COHERENCE_HOME%, and not COHERENCE_HOME.

i.e. Your command should look like java -cp %COHERENCE_HOME%\config;%COHERENCE_HOME%\lib\coherence.jar com.tangosol.net.DefaultCacheServer

Also please check if the com.tangosol.net.DefaultCacheServer class is on the classpath.

查看更多
登录 后发表回答