cxf wsdl2java.bat 中如何设置JAVA_HOME CXF_HOME?

371 views
Skip to first unread message

zenghu...@yahoo.com.hk

unread,
Jul 27, 2011, 6:39:21 AM7/27/11
to cxf-zh
@setlocal

if not defined CXF_HOME goto set_cxf_home

:cont
if not defined JAVA_HOME goto no_java_home

set SUN_TOOL_PATH=%JAVA_HOME%\lib\tools.jar;

if not exist "%CXF_HOME%\lib\cxf-manifest.jar" goto no_cxf_jar

set CXF_JAR=%CXF_HOME%\lib\cxf-manifest.jar


"%JAVA_HOME%\bin\java" -Xmx128M -cp "%CXF_JAR%;%SUN_TOOL_PATH%;
%CLASSPATH%" -Djava.util.logging.config.file="%CXF_HOME%\etc
\logging.properties" org.apache.cxf.tools.wsdlto.WSDLToJava %*

@endlocal

goto end

:no_cxf_jar
echo ERROR: Unable to find cxf-manifest.jar in %cxf_home/lib
goto end

:no_java_home
echo ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is
installed
goto end

:set_cxf_home
set CXF_HOME=%~dp0..
goto cont

:end


set JAVA_HOME=C:/Program Files/Java/jre1.6.0_07
set CXF_HOME = D:/cxf\apache-cxf-2.2.12/bin

我把它们放到下面的位置,执行CMD命令,可以运行:wsdl2java hellow_world.wsdl ,但是文件所在的地方没有反应,没有
生成任何文件(都是在bin文件夹里面的)。
:no_java_home
set JAVA_HOME=C:/Program Files/Java/jre1.6.0_07
goto end

:set_cxf_home
set CXF_HOME = D:/cxf\apache-cxf-2.2.12/bin
goto cont

:end

请问这两个应该放在哪里?

Willem Jiang

unread,
Jul 27, 2011, 7:05:20 AM7/27/11
to cxf...@googlegroups.com
> �Ұ����Ƿŵ������λ�ã�ִ��CMD����,�������У�wsdl2java hellow_world.wsdl ,�����ļ����ڵĵط�û�з�Ӧ��û��
> ����κ��ļ���������bin�ļ��������)��

> :no_java_home
> set JAVA_HOME=C:/Program Files/Java/jre1.6.0_07
> goto end
>
> :set_cxf_home
> set CXF_HOME = D:/cxf\apache-cxf-2.2.12/bin
> goto cont
>
> :end
>
> ����������Ӧ�÷������
>
set CXF_HOME = D:/cxf/apache-cxf-2.2.12/


--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply all
Reply to author
Forward
0 new messages