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
Joined: Jan 23, 2004
Posts: 78
posted
0
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.
formerly known as Cnu
Jason Hocker
Ranch Hand
Joined: Jul 23, 2003
Posts: 132
posted
0
I planned to use the javadoc method. I am new to ant, so I appreciate any help.
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
posted
0
Can you show us the relevant part(s) of your ant script, please?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jason Hocker
Ranch Hand
Joined: Jul 23, 2003
Posts: 132
posted
0
[edited to escape XML] [ March 20, 2007: Message edited by: Jeanne Boyarsky ]
Does the JAVA_HOME environment variable point to a correct JDK root folder?
Carol Enderlin
drifter
Ranch Hand
Joined: Oct 10, 2000
Posts: 1348
posted
0
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
Joined: Aug 17, 2001
Posts: 171
posted
0
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.
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!