CreateProcess error=2 running javadoc from Ant

后端 未结 6 1978
执笔经年
执笔经年 2021-02-04 02:56

Can anyone tell me why I am getting this error message

Buildfile: C:\\Users\\Tara\\workspace\\Testing\\build.xml
doc:
   [delete] Deleting directory C:\\Users\\         


        
相关标签:
6条回答
  • 2021-02-04 03:30

    javadoc is not in the path. With newer ant you can provide attribute (executable) to specify exe location. See documentation here

    0 讨论(0)
  • 2021-02-04 03:35

    Add javadoc.exe to your build path.

    1. From the start menu, click on Control Panel > System (use classic view) to view system properties.
    2. In the System Properties window, click on Advanced to the left.
    3. Click on Environment Variables.
    4. In the list of System Variables, select Path and then press the Edit button. a window that allows you to alter the value of the Path variable.
    5. At the end of the text for the Path variable, add a semicolon and the directory path to Java (no spaces): eg. C:\Program Files\Java\jdk1.6.0_39\bin
    0 讨论(0)
  • 2021-02-04 03:43

    Providing you have a jdk installed and added to Eclipse:

    1. Windows->Preferences Java->Installed
    2. JREs->Add

    You can then

    1. Right click on build.xml
    2. Select Run As->Ant Build... note the ellipsis!
    3. Switch to JRE tab
    4. Select the jdk from the list

    Credit for a similar solution: http://blog.darevay.com/2008/12/running-javadoc-ant-task-from-eclipse/

    0 讨论(0)
  • 2021-02-04 03:47

    Change Ant Config : [Edit Configuration] -> [JRE] -> Change jre to jdk and I solve this problem

    0 讨论(0)
  • 2021-02-04 03:51

    I came across the same issue and solved it by adding an additional JREs definitions under:

    Windows > Preferences > Java > Installed JREs

    At the time it failed, I was using Jre7 in C:\Program Files\Java\jre7 then I have added and selected Jre in C:\Program Files\Java\jdk1.7.0_07\jre.

    0 讨论(0)
  • 2021-02-04 03:51

    make sure the javadoc.exe is on your path; this error usually means the ant task cannot find the executable

    0 讨论(0)
提交回复
热议问题