• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

doing javadoc with ant in eclipse

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a build.xml that wants to do javadoc, but get the error...


Cannot run program "javadoc.exe": CreateProcess error=2, The system cannot find the file specified


How do I set the path?
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Create Process Error=2 normally occurs when you don't have the specified process in path.

This is one way of doing it in ant (haven't tested this)
if you have a JAVA_HOME variable set, you could refer to the javadoc.exe as follows.

There may be other elegant ways. for instance the javadoc task in ant may be a better choice than exec. Or may be you could add JAVA_HOME/bin to your path.
 
Jason Hocker
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I planned to use the javadoc method. I am new to ant, so I appreciate any help.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you show us the relevant part(s) of your ant script, please?
 
Jason Hocker
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


[edited to escape XML]
[ March 20, 2007: Message edited by: Jeanne Boyarsky ]
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have a separate forum for Ant, so I'm moving your post there since it has more to do with Ant than Eclipse.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the JAVA_HOME environment variable point to a correct JDK root folder?
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you run with -verbose argument you should see what path it is trying to use for javadoc.exe.

Here's mine:
 
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having the same problem on my home PC. The strange thing is, it works fine on my computer at work, and they are similarly configured. My JAVA_HOME and ANT_HOME are set correctly.

Why can't Ant find the javadoc executable for the <javadoc> task, the same way it finds the javac executable for the <javac> task?

I just updated my Eclipse to the very latest updates (2009-03-26). I googled this today and found no help either.

Thanks
Geoffrey
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Geoffrey,

We try not to URL=http://faq.javaranch.com/java/DontWakeTheZombies]WakeTheZombies[/URL] around here . Can you post your specific problem in a separate thread? I'd post your full PATH and JAVA_HOME details in the new thread and we can get started!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic