The moose likes Ant, Maven and Other Build Tools and the fly likes Javadoc failed: CreateProcess Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Javadoc failed: CreateProcess" Watch "Javadoc failed: CreateProcess" New topic

Javadoc failed: CreateProcess

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I'm using Eclipse 2.1 with its Ant 1.5 core plugin, and the javadoc target fails with the message seen in the subject for this posting.
What is really strange is that there is no problem running Ant 1.5 from command line on the exact same build.xml. It only has a problem when run through Eclipse. Has anyone seen this?
I've spent a good amount of time looking for this error in various newsgroups. The error is out there, but most every posting seen has been an initial posting with no reply.
The javadoc target is:

but this probably does not matter because Ant 1.5 from commandline processes this target without complaint.
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Can you get some more info from your .log - file in the .metadata directory?

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
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Oddly, no -- these events are not logged. I tried shutting down and restarting Eclipse in hopes that the log had not been flushed. Repeated attempts have failed to get anything related to this issue in the .log file.
I have, for the time being, opted to use Ant 1.5 from commandline. This has been fine and everything is working. I'll run this issue past a guy at work who knows lots about Eclipse and post his insight here.
Kieran Bee

Joined: Jan 30, 2003
Posts: 17
Is javadoc.exe in the PATH? I remember having an error of that kind and that was all it turned out to be.
Keith Thomas

Joined: Oct 10, 2000
Posts: 3
I just had exactly the same problem. The cause was not having javadoc.exe in my path. Thanks very much for taking the time to post the solution.
Gary Kephart

Joined: Jul 29, 2003
Posts: 6
More thanks from someone with the same problem.
Uwe Kubosch

Joined: Sep 02, 2003
Posts: 2
How do I add javadoc.exe to the PATH of the ant script in Eclipse without using a script file?
Zak Nixon
Ranch Hand

Joined: Sep 27, 2003
Posts: 126
Can anyone answer the above question?
Zak Nixon
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
Originally posted by Uwe Kubosch:
How do I add javadoc.exe to the PATH of the ant script in Eclipse without using a script file?

It's not an issue with the ant path, but a problem with the system path. i.e. can you type 'javadoc' at the command line and have the system resolve it? This is effectively what ant tries to do. If it fails for you, it will fail for ant!
Note that once you get it fixed for yourself, you need to restart eclipse/wsad for it to pick up the new path.

"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The team, Newsletter 039.
dan skal

Joined: Jul 30, 2004
Posts: 2
If you are using ant integrated into Intellij Idea (I am using v3), you may need to change the build file properties, and under "execution", select "Run under custom JDK", as your system default JRE/JDK may not have javadoc.exe. Obviously then you select a JDK which _does_ have javadoc.
[ July 30, 2004: Message edited by: dan skal ]
Corey Scott

Joined: Sep 19, 2004
Posts: 1
I know this is an old topic, but i had this problem too. Except I had one machine that it would work on and another that it wouldnt.

Eventually i found that the problem wasnt the classpath but the system path, if you make sure that the jdk/bin folder is in the system path then ANT will find the javadoc in eclipse (requires a restart).

Hope this helps.

Pinky & the Brain <br />---------------------<br />Pinky: What are we going to do tonight Brain?<br /> <br />Brain: The same thing we do every night Pinky, try to program Hello World.
Robert E Russell

Joined: Jan 11, 2005
Posts: 1
Use the useexternalfile="yes" attribute of the javadoc target.
This shortens the command line used.
abcdefg gfedcba

Joined: Nov 03, 2005
Posts: 1
Another possible reason for the problem is the command line is too long. We were using individual class names in our class path (turning a class path ref in ANT into a class path and then passing it in). We have hundreds of classes. We did the obvious solution, which was to put a jar file containing the class files into the class path.

This was working on one computer (win XP with cmd) but not working on others (win XP with cmd, win 2k with cmd, both computers via ssh).
Kathy Hale

Joined: Jan 24, 2007
Posts: 5
Again, I know it's an old post, but for the Googler's out there... here was my solution.

Eclipse 3.2.2 and I had only JRE 5.0 (how Eclipse was running without javac or JAVA_HOME no one really knows...)

Download the JDK (development kit, not runtime environment) and point Eclipse to that. This, by proxy, will get "javadoc" added, and it will magically work!

JDK5 Download
After you have downloaded, install - such as C:/Program Files/Java/JDK5...

Java builder: Windows -> Preferences -> Java -> Installed JREs -> Add the JDK installation.

This solution worked for me without restart, although Eclipse did rebuild all of my open projects.
Axel Nitzschner

Joined: Apr 16, 2007
Posts: 1
thanks a lot. That did it...
pax smith
Ranch Hand

Joined: Dec 13, 2005
Posts: 45
I know this is an old topic, but i had this problem too.

Here I don't have any issue with class path and sytem path. Issues is like this Ant script work fine if I exclude one package. But If I include this package it is giving problem.

I tried to create java doc for that package or its parent package. It is working FINE. there is no issue but when I tried to create java doc for whole project then this package is giving error.
Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

Hi Pax,

We try not to wake the zombies here . Can you post in a new thread with the details of your exact problem?

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
I agree. Here's the link:
subject: Javadoc failed: CreateProcess
It's not a secret anymore!