DOS下执行java

在DOC环境中,我们执行java命令时,经常会报错,报类找不到

原因:
由于没有置classpath

解决办法
通过set classpath命令设置classpath

set CLASSPATH=.;.\client.jar;.\lib\activation-1.1.jar;.\lib\annogen-0.1.0.jar;.\lib\axiom-api-1.2.jar;.\lib\axiom-dom-1.2.jar;.\lib\axiom-impl-1.2.jar;.\lib\axis2-adb-1.1.jar;.\lib\axis2-adb-codegen-1.1.jar;.\lib\axis2-codegen-1.1.jar;.\lib\axis2-java2wsdl-1.1.jar;.\lib\axis2-jibx-1.1.jar;.\lib\axis2-kernel-1.1.jar;.\lib\axis2-saaj-1.1.jar;.\lib\axis2-soapmonitor-1.1.jar;.\lib\axis2-spring-1.1.jar;.\lib\axis2-tools-1.1.jar;.\lib\axis2-xmlbeans-1.1.jar;.\lib\backport-util-concurrent-2.2.jar;.\lib\commons-codec-1.3.jar;.\lib\commons-fileupload-1.1.1.jar;.\lib\commons-httpclient-3.0.1.jar;.\lib\commons-io-1.2.jar;.\lib\commons-logging-1.1.jar;.\lib\geronimo-spec-jms-1.1-rc4.jar;.\lib\jakarta-httpcore-4.0-alpha2.jar;.\lib\jaxen-1.1-beta-10.jar;.\lib\jibx-bind-1.1.2.jar;.\lib\jibx-run-1.1.2.jar;.\lib\mail-1.4.jar;.\lib\neethi-2.0.jar;.\lib\servletapi-2.3.jar;.\lib\stax-api-1.0.1.jar;.\lib\woden-1.0.0M6.jar;.\lib\wsdl4j-1.6.1.jar;.\lib\wstx-asl-3.0.1.jar;.\lib\xalan-2.7.0.jar;.\lib\xbean-2.2.0.jar;.\lib\xercesImpl-2.8.1.jar;.\lib\xml-apis-1.3.03.jar;.\lib\XmlSchema-1.2.jar;.\lib\extend\CBSInterfaceAccountMgrService-test-client.jar;.\lib\extend\CBSInterfaceBusinessMgrService-test-client.jar;.\lib\extend\CBSInterfaceProductMgrService-test-client.jar;.\lib\extend\Boss4CBSInterfaceService-test-client.jar;.\lib\extend\UVSInterfaceService-test-client.jar;.\lib\extend\IvrClientTestServices-test-client.jar;.\lib\extend\IvrClientWorkOrderTestServices-test-client.jar;.\lib\extend\CBSInterfacecommunityMgrService-test-client.jar;.\lib\extend\CBSInterfaceINByPassMgrService-test-client.jar

if "%JAVA_HOME%" == "" (
	set JAVA_HOME=D:\primeton\ide\eclipse\jre
)
set JAVA=%JAVA_HOME%\bin\java
"%JAVA%" -classpath "%CLASSPATH%" com.huawei.bme.test.main.Main

你可能感兴趣的:(java,eclipse,spring,jms,dos)