gpt4 book ai didi

java - 无法运行程序 "wsimport": CreateProcess in eclipse

转载 作者:行者123 更新时间:2023-12-04 05:13:40 32 4
gpt4 key购买 nike

这个问题是针对 java web 服务初学者的。
如果您遇到 的问题制作 或用于生成 客户 代码在 网络服务 .
因此,我建议您按照以下步骤操作:-

1) Open your eclipse, i'm sure it shall be open only :)
2) Now go to File > Properties or just say (  ALT +   Enter    )**
3) You shall be prompted with new window Named "Properties"
4)Here look for the Java Build Path , then check for the Installed JRE of your eclipse.
5)If path is given only JRE but not jdk, Please change it immediately



这是唯一不允许您调用 的事情wsimport 命令。
因为 wsimport exe 位于 中的文件JDK/bin目录不在 JRE目录
这就是为什么你总是遇到无法执行命令的问题。
现在享受你的学习。

最佳答案

您可以尝试使用 Apache Ant使用 wsimport 在 Eclipse 上生成 WebService 客户端来自 JDK 的工具。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project>
<project name="generate-client" default="generate-client" basedir=".">

<property name="java.home" value="C:\Software\Java\jdk1.7.0_05" />
<property name="wsdl.location"
value="http://www.webservicex.net/geoipservice.asmx?WSDL" />

<target name="generate-client">
<exec executable="${java.home}\bin\wsimport.exe">
<arg line="${wsdl.location} -s src -Xdebug -verbose -Xnocompile" />
</exec>
</target>

</project>

将此 XML 文件放在您的项目文件夹中。

关于java - 无法运行程序 "wsimport": CreateProcess in eclipse,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14567336/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com