[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installation - ant throws an exception




Hi.

On Sun, 12 Nov 2000 15:00:13 +0100
"luc.saffre" <luc.saffre@pacsystems.be> wrote:

> Hi,
> 
> I just started with ozone, and I had a similar problem as Raul Fiedler
> described on Mon 7 Aug 2000. Lars Martin's reply to his message helped me to
> fix the problem (Thank you).
> I simply had to set a variable JAVA_HOME so that ant.bat sets the CLASSPATH
> differently before running "java org.apache.tools.ant.Main".
> 
> My question is: where does this variable JAVA_HOME comes from? Until now I
> did never need it, and I cannot find any documentation about it. Perhaps
> somebody who knows more about it should explain the following lines in
> ant.bat :
> 
> :checkJavaHome
> if "%JAVA_HOME%" == "" goto runAnt
> set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH%
> 
> :runAnt
> set CLASSPATH=%ANT_HOME%\bin\ant.jar;%ANT_HOME%\bin\xerces.jar;%CLASSPATH%
> java -Dant.home="%ANT_HOME%" org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7
> %8 %9


The JAVA_HOME environment variable was necessary for JDK 1.1 and is not really
needed for JDK 1.2 which is now able to determine the needed pathes while
runtime. For the JDK 1.1 package this variable indicated the root directory
for the installed software package. The Ant build scripts use this variable
to append the needed 'tools.jar' to the CLASSPATH. So set this variable properly
to avoid such error messages.


> To: "Fiedler.Raul" <Raul.Fiedler@ecb.int>, "'ozone-users@ozone-db.org'"
> <ozone-users@ozone-db.org>
> Subject: Re: Installation - ant throws an exception
> From: Lars Martin <lars@smb-tec.com>
> Date: Mon, 7 Aug 2000 12:26:05 +0200
> In-Reply-To: <1E6FD4C0F841D311854800204840A84C034500B7@gimexc01.ecb.de>
> Organization: SMB GmbH
> References: <1E6FD4C0F841D311854800204840A84C034500B7@gimexc01.ecb.de>
> 
> 
> Hi Raul,
> 
> On Mon, 07 Aug 2000, Fiedler.Raul wrote:
> > Dear Ozone,
> >
> > Using the Ozone 5.4 download.
> > Please give me a hint why invocation of ant in my ozone home directory
> > throws this exception.
> >
> > Below is the output:
> > unix /home/icsrfi/develop/ozone/ozone-0.5.4>  ant
> > Buildfile: build.xml
> > Project base dir set to: /home/icsrfi/develop/ozone/ozone-0.5.4
> > Executing Target: init
> > Executing Target: prepare
> > Executing Target: DxLib
> > Compiling 62 source files to /home/icsrfi/develop/ozone/ozone-0.5.4
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > sun/tools/javac/Main
> 
> You can find this class in the tools.jar file of your Java installation,
> this
> should be something like $JAVA_HOME/lib/tools.jar. It seems that you
> didn't install your Java package properly. Did you set the environment
> variable JAVA_HOME?
> 
> If so, which JDK do you use?
> Which ant do you use, the one that comes woth the ozone distribution?
> 
> >         at
> org.apache.tools.ant.taskdefs.Javac.doClassicCompile(Javac.java,
> > Compiled Code)
> >         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java,
> Compiled
> > Code)
> >         at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
> >         at org.apache.tools.ant.Project.runTarget(Project.java, Compiled
> > Code)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java,
> Compiled
> > Code)
> >         at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
> >         at org.apache.tools.ant.Main.main(Main.java, Compiled Code)
> >
> > best regards
> > Raul
> > raul.fiedler@ecb.int
> 
> Regards,
> Lars
> --
> ___________________________________________________________________
> Lars Martin                                 mailto:lars@smb-tec.com
> SMB GmbH                                     http://www.smb-tec.com
> 
> 


--
___________________________________________________________________
Lars Martin                                 mailto:lars@smb-tec.com
SMB GmbH                                     http://www.smb-tec.com