Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javadoc failed: java.io.IOException: CreateProcess

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ranchers,
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
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you get some more info from your .log - file in the .metadata directory?
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ilja,
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
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More thanks from someone with the same problem.
 
Uwe Kubosch
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I add javadoc.exe to the PATH of the ant script in Eclipse without using a script file?
 
Zak Nixon
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone answer the above question?
Zak Nixon
 
David Hibbs
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
dan skal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Robert E Russell
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the useexternalfile="yes" attribute of the javadoc target.
This shortens the command line used.
 
abcdefg gfedcba
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot. That did it...
Axel
 
pax smith
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pax,

We try not to wake the zombies here . Can you post in a new thread with the details of your exact problem?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic