【问题标题】:I am getting error when I am compiling xmlbeans : java io.ioexception cannot run the program "javac"编译 xmlbeans 时出现错误:java io.ioexception 无法运行程序“javac”
【发布时间】:2013-01-30 07:16:43
【问题描述】:

我正在尝试运行一个 xmlBeans 示例来编译一个 xsd 并创建一个与之对应的 jar,但是我一次又一次地收到此错误

java.io.Exception: Cannot run program "filelocation\javac": CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start
    ............

它可能与我的“路径”或“类路径”环境变量有关。请提出一些建议。

【问题讨论】:

    标签: parsing xml-parsing xmlbeans


    【解决方案1】:

    我找到了问题的解决方案

    我正在使用命令

    scomp -out 汽车政策.jar 汽车政策.xsd

    但我猜路径变量中的 javac 位置存在一些问题

    所以我给了这个命令

    scomp -compiler "c:\Program Files\Java\jdk1.6\bin\javac.exe" -out 汽车政策.jar 汽车政策.xsd

    它在该位置提供了所需的汽车政策.jar。

    请注意,javac.exe 的位置可能不同。

    【讨论】:

      猜你喜欢
      • 2012-06-24
      • 1970-01-01
      • 2016-10-04
      • 2015-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多