You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Herman, Dave" <dh...@intrado.com> on 2001/07/16 18:35:08 UTC
RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdef
s Javadoc.java
Is that the right path? I thought the JAVA_HOME variable was supposed to be
the root directory of the JDK, so the path would be java.home/bin/javadoc?
Dave
> -----Original Message-----
> From: glennm@apache.org [mailto:glennm@apache.org]
> Sent: Sunday, July 15, 2001 8:25 AM
> To: jakarta-ant-cvs@apache.org
> Subject: cvs commit:
> jakarta-ant/src/main/org/apache/tools/ant/taskdefs
> Javadoc.java
>
>
> glennm 01/07/15 07:25:29
>
> Modified: src/main/org/apache/tools/ant/taskdefs Javadoc.java
> Log:
> The javadoc task now looks for the javadoc executable
> in the java.home/../bin directory. That way if your
> java installation isn't in your path, you can still
> create javadocs.
>
> Revision Changes Path
> 1.55 +2 -1
> jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
>
> Index: Javadoc.java
> ===================================================================
> RCS file:
> /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/J
> avadoc.java,v
> retrieving revision 1.54
> retrieving revision 1.55
> diff -u -r1.54 -r1.55
> --- Javadoc.java 2001/07/08 06:21:45 1.54
> +++ Javadoc.java 2001/07/15 14:25:28 1.55
> @@ -734,7 +734,8 @@
> }
>
> Commandline toExecute = (Commandline)cmd.clone();
> - toExecute.setExecutable("javadoc");
> + toExecute.setExecutable(System.getProperty("java.home") +
> + "/../bin/javadoc");
>
> // ------------------------------------------------
> general javadoc arguments
> if (classpath == null)
>
>
>
>
Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs
Javadoc.java
Posted by Glenn McAllister <gl...@somanetworks.com>.
Conor MacNeill wrote:
> A word of warning. The Windows JDK installers typically throw a java.exe in
> the winnt\system32 directory. When you run that java it will end up with
> java.home pointing to some other JRE directory (i.e. not the one under the
> JDK install). The relative path will not find you a javadoc :-(.
>
> The solution is to probably document the folly of Sun's installers. Working
> around it is rather hard.
Hmm... the problem for me is that I need the change for our build environment;
eventually we will *never* have the JDK in our path during a build as we need
to keep strict control over what tools we are compiling with. How does this
sound: check to see if ${java.home}/../bin/javadoc(.exe) exists. If it does,
use it. If not, fall back on assuming javadoc is in the path. And document
the folly of Sun's installers. :-)
Glenn
Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Javadoc.java
Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
A word of warning. The Windows JDK installers typically throw a java.exe in
the winnt\system32 directory. When you run that java it will end up with
java.home pointing to some other JRE directory (i.e. not the one under the
JDK install). The relative path will not find you a javadoc :-(.
The solution is to probably document the folly of Sun's installers. Working
around it is rather hard.
Conor
----- Original Message -----
From: "Glenn McAllister" <gl...@somanetworks.com>
To: <an...@jakarta.apache.org>
Sent: Tuesday, July 17, 2001 11:53 PM
Subject: Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs
Javadoc.java
> Nico Seessle wrote:
>
> > ----- Original Message -----
> > From: "Herman, Dave" <dh...@intrado.com>
> > To: <an...@jakarta.apache.org>
> > Sent: Monday, July 16, 2001 6:35 PM
> > Subject: RE: cvs commit:
jakarta-ant/src/main/org/apache/tools/ant/taskdefs
> > Javadoc.java
> >
> > > Is that the right path? I thought the JAVA_HOME variable was supposed
to
> > be
> > > the root directory of the JDK, so the path would be
java.home/bin/javadoc?
> > >
>
> As Nico has so eloquantly demonstrated ( :-] ), the java.home System
property
> points to the JRE home dir, not the JDK.
>
> >
> >
> > C:\temp>type build.xml
> > <?xml version="1.0"?>
> > <project default="main" basedir=".">
> > <target name="main">
> > <echo message="${java.home}"/>
> > </target>
> > </project>
> >
> > C:\temp>set JAVA
> > JAVA_HOME=C:\jdk14
> >
> > C:\temp>ant.bat
> > Buildfile: build.xml
> >
> > main:
> > [echo] C:\jdk14\jre
> >
> > BUILD SUCCESSFUL
> >
> > Total time: 1 second
> > C:\temp>
> >
> > Nico
>
> Glenn McAllister
>
>
Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs
Javadoc.java
Posted by Glenn McAllister <gl...@somanetworks.com>.
Nico Seessle wrote:
> ----- Original Message -----
> From: "Herman, Dave" <dh...@intrado.com>
> To: <an...@jakarta.apache.org>
> Sent: Monday, July 16, 2001 6:35 PM
> Subject: RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs
> Javadoc.java
>
> > Is that the right path? I thought the JAVA_HOME variable was supposed to
> be
> > the root directory of the JDK, so the path would be java.home/bin/javadoc?
> >
As Nico has so eloquantly demonstrated ( :-] ), the java.home System property
points to the JRE home dir, not the JDK.
>
>
> C:\temp>type build.xml
> <?xml version="1.0"?>
> <project default="main" basedir=".">
> <target name="main">
> <echo message="${java.home}"/>
> </target>
> </project>
>
> C:\temp>set JAVA
> JAVA_HOME=C:\jdk14
>
> C:\temp>ant.bat
> Buildfile: build.xml
>
> main:
> [echo] C:\jdk14\jre
>
> BUILD SUCCESSFUL
>
> Total time: 1 second
> C:\temp>
>
> Nico
Glenn McAllister
Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Javadoc.java
Posted by Nico Seessle <ni...@apache.org>.
----- Original Message -----
From: "Herman, Dave" <dh...@intrado.com>
To: <an...@jakarta.apache.org>
Sent: Monday, July 16, 2001 6:35 PM
Subject: RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs
Javadoc.java
> Is that the right path? I thought the JAVA_HOME variable was supposed to
be
> the root directory of the JDK, so the path would be java.home/bin/javadoc?
>
C:\temp>type build.xml
<?xml version="1.0"?>
<project default="main" basedir=".">
<target name="main">
<echo message="${java.home}"/>
</target>
</project>
C:\temp>set JAVA
JAVA_HOME=C:\jdk14
C:\temp>ant.bat
Buildfile: build.xml
main:
[echo] C:\jdk14\jre
BUILD SUCCESSFUL
Total time: 1 second
C:\temp>
Nico