You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Gav...." <br...@brightontown.com.au> on 2006/03/07 14:32:24 UTC

JAVA_HOME error

Hi All,

Just reinstalled everything onto new laptop and now can not get forrest build to work, complains it can not find the java compiler.

heres the output :-

D:\Apache2\forrest\main>build
Using classpath: ";..\lib\endorsed\jakarta-bcel-20040329.jar;..\lib\endorsed\jak
arta-regexp-1.4.jar;..\lib\endorsed\xalan-2.7.0.jar;..\lib\endorsed\xercesImpl-2
.7.1.jar;..\lib\endorsed\xml-apis-1.3.02.jar"
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.5.
0_06\lib\tools.jar
Buildfile: build.xml

init:

      --------------------------------------------------------------

      Using Apache Ant version 1.6.2 compiled on July 16 2004
      Build file D:\Apache2\forrest\main\build.xml
      Use 'build.[sh|bat] -projecthelp' to see other options.
      Build system home ..\tools\ant
      Build number 13
      Project Name Forrest build file
      Java Version 1.5
      Timestamp 200603072123
      This is: apache-forrest 0.8-dev

      --------------------------------------------------------------


compile:
Compiling 34 source files to D:\Apache2\forrest\build\classes

BUILD FAILED
D:\Apache2\forrest\main\build.xml:358: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK

Total time: 1 second

This worked fine with 1.5.0_04 on my old lappy, but not with 1.5.0_06 on this one.
Path and JAVA_HOME are set.

Any ideas or known issues ?

Gav...

Re: JAVA_HOME error

Posted by Torsten Stolpmann <To...@verit.de>.

Gav.... wrote:
> Hi All,
>  
> Just reinstalled everything onto new laptop and now can not get forrest 
> build to work, complains it can not find the java compiler.
>  
> heres the output :-
>  
> D:\Apache2\forrest\main>build
> Using classpath: 
> ";..\lib\endorsed\jakarta-bcel-20040329.jar;..\lib\endorsed\jak
> arta-regexp-1.4.jar;..\lib\endorsed\xalan-2.7.0.jar;..\lib\endorsed\xercesImpl-2
> .7.1.jar;..\lib\endorsed\xml-apis-1.3.02.jar"
> Unable to locate tools.jar. Expected to find it in C:\Program 
> Files\Java\jre1.5.
> 0_06\lib\tools.jar
> Buildfile: build.xml
>  
> init:
>  
>       --------------------------------------------------------------
>  
>       Using Apache Ant version 1.6.2 compiled on July 16 2004
>       Build file D:\Apache2\forrest\main\build.xml
>       Use 'build.[sh|bat] -projecthelp' to see other options.
>       Build system home ..\tools\ant
>       Build number 13
>       Project Name Forrest build file
>       Java Version 1.5
>       Timestamp 200603072123
>       This is: apache-forrest 0.8-dev
>  
>       --------------------------------------------------------------
>  
> 
> compile:
> Compiling 34 source files to D:\Apache2\forrest\build\classes
>  
> BUILD FAILED
> D:\Apache2\forrest\main\build.xml:358: Unable to find a javac compiler;
> com.sun.tools.javac.Main is not on the classpath.
> Perhaps JAVA_HOME does not point to the JDK
>  
> Total time: 1 second
>  
> This worked fine with 1.5.0_04 on my old lappy, but not with 1.5.0_06 on 
> this one.
> Path and JAVA_HOME are set.
>  
> Any ideas or known issues ?
>  
> Gav...

Possibly you installed a JRE but not a J2SDK?

HTH,
	Torsten

Re: JAVA_HOME error

Posted by Tim Williams <wi...@gmail.com>.
On 3/7/06, Gav.... <br...@brightontown.com.au> wrote:
>
> Hi All,
>
> Just reinstalled everything onto new laptop and now can not get forrest
> build to work, complains it can not find the java compiler.
>
> heres the output :-
>
> D:\Apache2\forrest\main>build
> Using classpath:
> ";..\lib\endorsed\jakarta-bcel-20040329.jar;..\lib\endorsed\jak
> arta-regexp-1.4.jar;..\lib\endorsed\xalan-2.7.0.jar;..\lib\endorsed\xercesImpl-2
> .7.1.jar;..\lib\endorsed\xml-apis-1.3.02.jar"
> Unable to locate tools.jar. Expected to find it in C:\Program
> Files\Java\jre1.5.
> 0_06\lib\tools.jar
> Buildfile: build.xml
>
> init:
>
>
> --------------------------------------------------------------
>
>       Using Apache Ant version 1.6.2 compiled on July 16 2004
>       Build file D:\Apache2\forrest\main\build.xml
>       Use 'build.[sh|bat] -projecthelp' to see other options.
>       Build system home ..\tools\ant
>       Build number 13
>       Project Name Forrest build file
>       Java Version 1.5
>       Timestamp 200603072123
>       This is: apache-forrest 0.8-dev
>
>
> --------------------------------------------------------------
>
>
> compile:
> Compiling 34 source files to
> D:\Apache2\forrest\build\classes
>
> BUILD FAILED
> D:\Apache2\forrest\main\build.xml:358: Unable to find a
> javac compiler;
> com.sun.tools.javac.Main is not on the classpath.
> Perhaps JAVA_HOME does not point to the JDK
>
> Total time: 1 second
>
> This worked fine with 1.5.0_04 on my old lappy, but not with 1.5.0_06 on
> this one.
> Path and JAVA_HOME are set.
>
> Any ideas or known issues ?
>
> Gav...

I'm running 1.5.0_06 without trouble - if it were a version problem,
you'd probably get specific class not found exceptions anyway.  I'd
double-check the simple stuff:
echo %JAVA_HOME%  (what's the output?)
java -version (what's the output?)

--tim