Coherence: Error: Could not find or load main class com.tangosol.net.DefaultCacheServer [closed]

為{幸葍}努か 提交于 2019-12-25 06:14:09

问题


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:


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.



来源:https://stackoverflow.com/questions/15993037/coherence-error-could-not-find-or-load-main-class-com-tangosol-net-defaultcach

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!