You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "A. Peace" <up...@stud.uni-karlsruhe.de> on 2001/12/21 10:48:58 UTC

build velocity failed

Could you be helpful to me and tell me how to figure out the building of velocity. I've looked the archives and could see there was already the same problem by one user but no proposal solution for the problem.  

Every thing is working noramly, JAVA_HOME ist set correctly and work fine ie. with tomcat, can use the command line to compile java source code and there is no problem. 
The previous version of velocity has till yesterday worked properly. As i started it yesterday, the message you will see later appear. I download the version 1.2 and the same message appears. 


The build break up with the following message:


Buildfile: build.xml

env:
     [echo] java.home = d:\jdk1.3.1_01\jre
     [echo] user.home = C:\Dokumente und Einstellungen\Peace
     [echo] java.class.path = d:\jdk1.3.1_01\lib\tools.jar;d:\jakarta-ant-1.4.1\
lib\xalan.jar;d:\jakarta-ant-1.4.1\lib\jaxp.jar;d:\jakarta-ant-1.4.1\lib\jakarta
-ant-1.4.1-optional.jar;d:\jakarta-ant-1.4.1\lib\crimson.jar;d:\jakarta-ant-1.4.
1\lib\ant.jar;d:\jdk1.3.1_01\bin; d:\velocity-1.2\velocity-1.2.jar;d:\velocity-1
.2\build\lib\commons-collections; d:\javaCC\JavaCC2_1.class;d:\jikes-1.15\bin;d:
\jdk1.3.1_01\Prog1Tools.zip;
     [echo]

prepare:

compile:
    [javac] Modern compiler is not available - using classic compiler
    [javac] Compiling 175 source files to D:\velocity-1.2\bin\classes

BUILD FAILED

D:\velocity-1.2\build\build.xml:185: Cannot use classic compiler, as it is not available A common solution is to set the environment variable JAVA_HOME to your
jdk directory.

Total time: 1 second

Any help in this direction should be apprecieted.

Peace

Re: build velocity failed

Posted by "A. Peace" <up...@stud.uni-karlsruhe.de>.
Is there another way to set it? I suppose i set it correctly as said abose,
otherwise i couldn't use tomcat for example.
I set the JAVA_HOME as followed:

JAVA_HOME=d:\jdk1.3.1_01.

What is wrong?

Thanks




----- Original Message -----
From: "Sylwester Lachiewicz" <ma...@plusnet.pl>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Sent: Friday, December 21, 2001 10:52 AM
Subject: Re: build velocity failed


> you should set JAVA_HOME to d:\jdk1.3.1_01 not to jre
>
>
> SL
>
> ----- Original Message -----
> From: "A. Peace" <up...@stud.uni-karlsruhe.de>
> To: <ve...@jakarta.apache.org>
> Sent: Friday, December 21, 2001 10:48 AM
> Subject: build velocity failed
>
>
> Could you be helpful to me and tell me how to figure out the building of
> velocity. I've looked the archives and could see there was already the
same
> problem by one user but no proposal solution for the problem.
>
> Every thing is working noramly, JAVA_HOME ist set correctly and work fine
> ie. with tomcat, can use the command line to compile java source code and
> there is no problem.
> The previous version of velocity has till yesterday worked properly. As i
> started it yesterday, the message you will see later appear. I download
the
> version 1.2 and the same message appears.
>
>
> The build break up with the following message:
>
>
> Buildfile: build.xml
>
> env:
>      [echo] java.home = d:\jdk1.3.1_01\jre
>      [echo] user.home = C:\Dokumente und Einstellungen\Peace
>      [echo] java.class.path =
> d:\jdk1.3.1_01\lib\tools.jar;d:\jakarta-ant-1.4.1\
>
lib\xalan.jar;d:\jakarta-ant-1.4.1\lib\jaxp.jar;d:\jakarta-ant-1.4.1\lib\jak
> arta
> -ant-1.4.1-optional.jar;d:\jakarta-ant-1.4.1\lib\crimson.jar;d:\jakarta-an
t-
> 1.4.
> 1\lib\ant.jar;d:\jdk1.3.1_01\bin;
> d:\velocity-1.2\velocity-1.2.jar;d:\velocity-1
> .2\build\lib\commons-collections;
> d:\javaCC\JavaCC2_1.class;d:\jikes-1.15\bin;d:
> \jdk1.3.1_01\Prog1Tools.zip;
>      [echo]
>
> prepare:
>
> compile:
>     [javac] Modern compiler is not available - using classic compiler
>     [javac] Compiling 175 source files to D:\velocity-1.2\bin\classes
>
> BUILD FAILED
>
> D:\velocity-1.2\build\build.xml:185: Cannot use classic compiler, as it is
> not available A common solution is to set the environment variable
JAVA_HOME
> to your
> jdk directory.
>
> Total time: 1 second
>
> Any help in this direction should be apprecieted.
>
> Peace
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: build velocity failed

Posted by Sylwester Lachiewicz <ma...@plusnet.pl>.
you should set JAVA_HOME to d:\jdk1.3.1_01 not to jre


SL

----- Original Message -----
From: "A. Peace" <up...@stud.uni-karlsruhe.de>
To: <ve...@jakarta.apache.org>
Sent: Friday, December 21, 2001 10:48 AM
Subject: build velocity failed


Could you be helpful to me and tell me how to figure out the building of
velocity. I've looked the archives and could see there was already the same
problem by one user but no proposal solution for the problem.

Every thing is working noramly, JAVA_HOME ist set correctly and work fine
ie. with tomcat, can use the command line to compile java source code and
there is no problem.
The previous version of velocity has till yesterday worked properly. As i
started it yesterday, the message you will see later appear. I download the
version 1.2 and the same message appears.


The build break up with the following message:


Buildfile: build.xml

env:
     [echo] java.home = d:\jdk1.3.1_01\jre
     [echo] user.home = C:\Dokumente und Einstellungen\Peace
     [echo] java.class.path =
d:\jdk1.3.1_01\lib\tools.jar;d:\jakarta-ant-1.4.1\
lib\xalan.jar;d:\jakarta-ant-1.4.1\lib\jaxp.jar;d:\jakarta-ant-1.4.1\lib\jak
arta
-ant-1.4.1-optional.jar;d:\jakarta-ant-1.4.1\lib\crimson.jar;d:\jakarta-ant-
1.4.
1\lib\ant.jar;d:\jdk1.3.1_01\bin;
d:\velocity-1.2\velocity-1.2.jar;d:\velocity-1
.2\build\lib\commons-collections;
d:\javaCC\JavaCC2_1.class;d:\jikes-1.15\bin;d:
\jdk1.3.1_01\Prog1Tools.zip;
     [echo]

prepare:

compile:
    [javac] Modern compiler is not available - using classic compiler
    [javac] Compiling 175 source files to D:\velocity-1.2\bin\classes

BUILD FAILED

D:\velocity-1.2\build\build.xml:185: Cannot use classic compiler, as it is
not available A common solution is to set the environment variable JAVA_HOME
to your
jdk directory.

Total time: 1 second

Any help in this direction should be apprecieted.

Peace



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: build velocity failed

Posted by "A. Peace" <up...@stud.uni-karlsruhe.de>.
javac works very fine without problems. I am used to it for more than 2
years now. The problems may not be with the compiler settings, but something
with velocity itself, i suppose. (os. is Windows 2000)
Two or three weeks ago, it has worked and yesterday not. No modification has
been made on my computer.

Thanx in advance!

----- Original Message -----
From: "Geir Magnusson Jr." <ge...@optonline.net>
To: <ve...@jakarta.apache.org>
Sent: Friday, December 21, 2001 11:36 AM
Subject: Re: build velocity failed


> On 12/21/01 5:30 AM, "A. Peace" <up...@stud.uni-karlsruhe.de> wrote:
>
> >
> > ----- Original Message -----
> > From: "Denis" <ji...@respublica.fr>
> > To: "Velocity Users List" <ve...@jakarta.apache.org>
> > Sent: Friday, December 21, 2001 11:04 AM
> > Subject: Re: build velocity failed
> >
> >
> >> Hi Peace
> >>
> >> On Friday, December 21, 2001, at 09:48  am, A. Peace wrote:
> >>
> >>> Could you be helpful to me and tell me how to figure out the
> >>> building of velocity. I've looked the archives and could see there
> >>> was already the same problem by one user but no proposal solution
> >>> for the problem.
> >>>
> >>>      [echo] java.home = d:\jdk1.3.1_01\jre
> >>
> >
> > Don't know from it reads java.home=d:\jdk1.3.1_01\jre. This is not my
> > settings. It may be java.home=d\jdk1.3.1_01 according to the settings.
>
>
> This is going to sound like a really stupid question : what happens when
you
> type 'javac'?  Does it work?
>
> --
> Geir Magnusson Jr.     geirm@optonline.net
> System and Software Consulting
> "Whoever would overthrow the liberty of a nation must begin by subduing
the
> freeness of speech." - Benjamin Franklin
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: build velocity failed

Posted by "A. Peace" <up...@stud.uni-karlsruhe.de>.
Thanks, i was already working on it and noticed, it was ant's problem. There
was ant.jar file in ../jre/lib/ext directory and that is. According to the
documentation, it mustn't be.

Thanx to all!


Peace

----- Original Message -----
From: "Bill Burton" <bi...@progress.com>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Sent: Friday, December 21, 2001 6:13 PM
Subject: Re: build velocity failed


> Hello,
>
> This is really an Ant configuration issue and probably not specific to
> Velocity.
>
> Ant doesn't use the javac command to do compiles.  It invokes the compiler
> directly by making an API call to a class in tools.jar.  The ant.bat
> script adds %JAVA_HOME%\lib\tools.jar to the CLASSPATH.  This is why
> JAVA_HOME must point to the JDK/SDK home and NOT the JRE home.  In
> addition, the ant.bat script will invoke the java command found at
> %JAVA_HOME%\bin\java unless you set JAVACMD to a different path to a java
> executable.
>
> I'd also suggest unsetting your CLASSPATH:
>   set CLASSPATH=
> It's not needed under normal circumstances as everything required will be
> added by Ant itself in ant.bat or by the build.xml as long as you set
> JAVA_HOME and ANT_HOME correctly.
>
> According to
> http://marc.theaimsgroup.com/?l=ant-user&m=100769534613243&w=2, the
> correct tools.jar isn't in your CLASSPATH.  This would indicate JAVA_HOME
> wasn't set corectly.
>
> If none of these things help, check the archives of the ant-user mailing
> list at http://marc.theaimsgroup.com/?l=ant-user&r=1&w=2 or post to
> ant-user.
>
> Also, do you really need to build Velocity?  It comes prebuilt.
>
> -Bill
>
> "Geir Magnusson Jr." wrote:
> >
> > On 12/21/01 5:30 AM, "A. Peace" <up...@stud.uni-karlsruhe.de> wrote:
> >
> > >
> > > ----- Original Message -----
> > > From: "Denis" <ji...@respublica.fr>
> > > To: "Velocity Users List" <ve...@jakarta.apache.org>
> > > Sent: Friday, December 21, 2001 11:04 AM
> > > Subject: Re: build velocity failed
> > >
> > >
> > >> Hi Peace
> > >>
> > >> On Friday, December 21, 2001, at 09:48  am, A. Peace wrote:
> > >>
> > >>> Could you be helpful to me and tell me how to figure out the
> > >>> building of velocity. I've looked the archives and could see there
> > >>> was already the same problem by one user but no proposal solution
> > >>> for the problem.
> > >>>
> > >>>      [echo] java.home = d:\jdk1.3.1_01\jre
> > >>
> > >
> > > Don't know from it reads java.home=d:\jdk1.3.1_01\jre. This is not my
> > > settings. It may be java.home=d\jdk1.3.1_01 according to the settings.
> >
> > This is going to sound like a really stupid question : what happens when
you
> > type 'javac'?  Does it work?
> >
> > --
> > Geir Magnusson Jr.     geirm@optonline.net
> > System and Software Consulting
> > "Whoever would overthrow the liberty of a nation must begin by subduing
the
> > freeness of speech." - Benjamin Franklin
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: build velocity failed

Posted by Bill Burton <bi...@progress.com>.
Hello,

This is really an Ant configuration issue and probably not specific to
Velocity.

Ant doesn't use the javac command to do compiles.  It invokes the compiler
directly by making an API call to a class in tools.jar.  The ant.bat
script adds %JAVA_HOME%\lib\tools.jar to the CLASSPATH.  This is why
JAVA_HOME must point to the JDK/SDK home and NOT the JRE home.  In
addition, the ant.bat script will invoke the java command found at
%JAVA_HOME%\bin\java unless you set JAVACMD to a different path to a java
executable.

I'd also suggest unsetting your CLASSPATH:
  set CLASSPATH=
It's not needed under normal circumstances as everything required will be
added by Ant itself in ant.bat or by the build.xml as long as you set
JAVA_HOME and ANT_HOME correctly.

According to
http://marc.theaimsgroup.com/?l=ant-user&m=100769534613243&w=2, the
correct tools.jar isn't in your CLASSPATH.  This would indicate JAVA_HOME
wasn't set corectly.

If none of these things help, check the archives of the ant-user mailing
list at http://marc.theaimsgroup.com/?l=ant-user&r=1&w=2 or post to
ant-user.

Also, do you really need to build Velocity?  It comes prebuilt.

-Bill

"Geir Magnusson Jr." wrote:
> 
> On 12/21/01 5:30 AM, "A. Peace" <up...@stud.uni-karlsruhe.de> wrote:
> 
> >
> > ----- Original Message -----
> > From: "Denis" <ji...@respublica.fr>
> > To: "Velocity Users List" <ve...@jakarta.apache.org>
> > Sent: Friday, December 21, 2001 11:04 AM
> > Subject: Re: build velocity failed
> >
> >
> >> Hi Peace
> >>
> >> On Friday, December 21, 2001, at 09:48  am, A. Peace wrote:
> >>
> >>> Could you be helpful to me and tell me how to figure out the
> >>> building of velocity. I've looked the archives and could see there
> >>> was already the same problem by one user but no proposal solution
> >>> for the problem.
> >>>
> >>>      [echo] java.home = d:\jdk1.3.1_01\jre
> >>
> >
> > Don't know from it reads java.home=d:\jdk1.3.1_01\jre. This is not my
> > settings. It may be java.home=d\jdk1.3.1_01 according to the settings.
> 
> This is going to sound like a really stupid question : what happens when you
> type 'javac'?  Does it work?
> 
> --
> Geir Magnusson Jr.     geirm@optonline.net
> System and Software Consulting
> "Whoever would overthrow the liberty of a nation must begin by subduing the
> freeness of speech." - Benjamin Franklin

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: build velocity failed

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 12/21/01 5:30 AM, "A. Peace" <up...@stud.uni-karlsruhe.de> wrote:

> 
> ----- Original Message -----
> From: "Denis" <ji...@respublica.fr>
> To: "Velocity Users List" <ve...@jakarta.apache.org>
> Sent: Friday, December 21, 2001 11:04 AM
> Subject: Re: build velocity failed
> 
> 
>> Hi Peace
>> 
>> On Friday, December 21, 2001, at 09:48  am, A. Peace wrote:
>> 
>>> Could you be helpful to me and tell me how to figure out the
>>> building of velocity. I've looked the archives and could see there
>>> was already the same problem by one user but no proposal solution
>>> for the problem.
>>> 
>>>      [echo] java.home = d:\jdk1.3.1_01\jre
>> 
> 
> Don't know from it reads java.home=d:\jdk1.3.1_01\jre. This is not my
> settings. It may be java.home=d\jdk1.3.1_01 according to the settings.


This is going to sound like a really stupid question : what happens when you
type 'javac'?  Does it work?

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
"Whoever would overthrow the liberty of a nation must begin by subduing the
freeness of speech." - Benjamin Franklin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: build velocity failed

Posted by "A. Peace" <up...@stud.uni-karlsruhe.de>.
----- Original Message -----
From: "Denis" <ji...@respublica.fr>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Sent: Friday, December 21, 2001 11:04 AM
Subject: Re: build velocity failed


> Hi Peace
>
> On Friday, December 21, 2001, at 09:48  am, A. Peace wrote:
>
> > Could you be helpful to me and tell me how to figure out the
> > building of velocity. I've looked the archives and could see there
> > was already the same problem by one user but no proposal solution
> > for the problem.
> >
> >      [echo] java.home = d:\jdk1.3.1_01\jre
>

Don't know from it reads java.home=d:\jdk1.3.1_01\jre. This is not my
settings. It may be java.home=d\jdk1.3.1_01 according to the settings.

thanx


> JRE = Java Runtime Engine. It's used only to execute java programs.
> There is no Java compiler in the directory you selected.
> Try d:\jdk1.3.1_01....
>
> -- Denis.
>
> >
> > Any help in this direction should be apprecieted.
> >
> > Peace
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: build velocity failed

Posted by Denis <ji...@respublica.fr>.
Hi Peace

On Friday, December 21, 2001, at 09:48  am, A. Peace wrote:

> Could you be helpful to me and tell me how to figure out the 
> building of velocity. I've looked the archives and could see there 
> was already the same problem by one user but no proposal solution 
> for the problem.
>
>      [echo] java.home = d:\jdk1.3.1_01\jre

JRE = Java Runtime Engine. It's used only to execute java programs. 
There is no Java compiler in the directory you selected.
Try d:\jdk1.3.1_01....

-- Denis.

>
> Any help in this direction should be apprecieted.
>
> Peace


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>