Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doing javadoc with ant in eclipse

 
Jason Hocker
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • 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?
 
Pavan Kumar
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
I planned to use the javadoc method. I am new to ant, so I appreciate any help.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator


[edited to escape XML]
[ March 20, 2007: Message edited by: Jeanne Boyarsky ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the JAVA_HOME environment variable point to a correct JDK root folder?
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • 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:
 
Geoffrey Falk
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
  • 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
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic