You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by jann1 <ja...@uni-landau.de> on 2009/07/29 14:00:45 UTC

annotations are only available if source level is 5.0

Hello all,
opensuse11.1, openbravoERP-250MP2:
ant install.source produces the following error:
----
compile:
     [javac] Compiling 1 source file to 
/tmp/OpenbravoERP-2.50MP2/src-db/build/classes
     [javac] ----------
     [javac] 1. ERROR in 
/tmp/OpenbravoERP-2.50MP2/src-db/src/com/openbravo/db/OpenbravoExcludeFilter.java 
(at line 23)
     [javac]     @Override
     [javac]     ^^^^^^^^^
     [javac] Syntax error, annotations are only available if source 
level is 5.0
     [javac] ----------
     [javac] 1 problem (1 error)
BUILD FAILED
/tmp/OpenbravoERP-2.50MP2/build.xml:493: The following error occurred 
while executing this line:
/tmp/OpenbravoERP-2.50MP2/build.xml:462: The following error occurred 
while executing this line:
/tmp/OpenbravoERP-2.50MP2/src-db/build.xml:42: Compile failed; see the 
compiler error output for details.
----
how to set the source level to 5.0 ????
or any ohter hints to get his running....
thx for ansering
Hermann


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: annotations are only available if source level is 5.0

Posted by Greg Roodt <gr...@gmail.com>.
There should be a build.xml somewhere in the project. Probably
/tmp/OpenbravoERP-2.50MP2/src-db/build
in your case, but Im not familiar with this project/product.
Inside the build.xml there will be an Ant target with a "javac" task.





On Wed, Jul 29, 2009 at 1:15 PM, jann1 <ja...@uni-landau.de> wrote:

> Scot P. Floess schrieb:
>
>>
>> Which version of Java do you have on your system?  If its stock 1.5+ it
>> should just work without using the <javac> target attribute...
>>
>
> java version 1.6.0_0
>
>  If all else fails I believe you can just do this:
>>
>> <javac target="1.5" ...
>>
>
> where to this <javac target="1.5" ... ????
>
> greetings
>
> Hermann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: annotations are only available if source level is 5.0

Posted by "Scot P. Floess" <sf...@nc.rr.com>.
Interesting...  If you are running 1.6.0_0 - there should be absolutely no 
reason @Override is failing compilation...

That is, unless your <javac> task has a target/source attribute of 1.4 or 
less...

For example:

<javac target="1.4" source="1.4" ...

You will need to search for build.xml or something like it to find the 
<javac> task call...



On Wed, 29 Jul 2009, jann1 wrote:

> Scot P. Floess schrieb:
>> 
>> Which version of Java do you have on your system?  If its stock 1.5+ it 
>> should just work without using the <javac> target attribute...
>
> java version 1.6.0_0
>
>> If all else fails I believe you can just do this:
>> 
>> <javac target="1.5" ...
>
> where to this <javac target="1.5" ... ????
>
> greetings
> Hermann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-890-8117 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: annotations are only available if source level is 5.0

Posted by jann1 <ja...@uni-landau.de>.
Scot P. Floess schrieb:
> 
> Which version of Java do you have on your system?  If its stock 1.5+ it 
> should just work without using the <javac> target attribute...

java version 1.6.0_0

> If all else fails I believe you can just do this:
> 
> <javac target="1.5" ...

where to this <javac target="1.5" ... ????

greetings
Hermann

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: annotations are only available if source level is 5.0

Posted by "Scot P. Floess" <sf...@nc.rr.com>.
Which version of Java do you have on your system?  If its stock 1.5+ it 
should just work without using the <javac> target attribute...

If all else fails I believe you can just do this:

<javac target="1.5" ...

Of course don't use the elipses as I have done above :)

On Wed, 29 Jul 2009, jann1 wrote:

> Hello all,
> opensuse11.1, openbravoERP-250MP2:
> ant install.source produces the following error:
> ----
> compile:
>    [javac] Compiling 1 source file to 
> /tmp/OpenbravoERP-2.50MP2/src-db/build/classes
>    [javac] ----------
>    [javac] 1. ERROR in 
> /tmp/OpenbravoERP-2.50MP2/src-db/src/com/openbravo/db/OpenbravoExcludeFilter.java 
> (at line 23)
>    [javac]     @Override
>    [javac]     ^^^^^^^^^
>    [javac] Syntax error, annotations are only available if source level is 
> 5.0
>    [javac] ----------
>    [javac] 1 problem (1 error)
> BUILD FAILED
> /tmp/OpenbravoERP-2.50MP2/build.xml:493: The following error occurred while 
> executing this line:
> /tmp/OpenbravoERP-2.50MP2/build.xml:462: The following error occurred while 
> executing this line:
> /tmp/OpenbravoERP-2.50MP2/src-db/build.xml:42: Compile failed; see the 
> compiler error output for details.
> ----
> how to set the source level to 5.0 ????
> or any ohter hints to get his running....
> thx for ansering
> Hermann
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-890-8117 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: annotations are only available if source level is 5.0

Posted by "Scot P. Floess" <sf...@nc.rr.com>.
Oops - yeah include the source attribute too :)

On Wed, 29 Jul 2009, Greg Roodt wrote:

> Try this:
>
> <javac srcdir="${src}" classpathref="classpath" destdir="${bin}"
> target="1.5" source="1.5" />
>
>
> On Wed, Jul 29, 2009 at 1:00 PM, jann1 <ja...@uni-landau.de> wrote:
>
>> Hello all,
>> opensuse11.1, openbravoERP-250MP2:
>> ant install.source produces the following error:
>> ----
>> compile:
>>    [javac] Compiling 1 source file to
>> /tmp/OpenbravoERP-2.50MP2/src-db/build/classes
>>    [javac] ----------
>>    [javac] 1. ERROR in
>> /tmp/OpenbravoERP-2.50MP2/src-db/src/com/openbravo/db/OpenbravoExcludeFilter.java
>> (at line 23)
>>    [javac]     @Override
>>    [javac]     ^^^^^^^^^
>>    [javac] Syntax error, annotations are only available if source level is
>> 5.0
>>    [javac] ----------
>>    [javac] 1 problem (1 error)
>> BUILD FAILED
>> /tmp/OpenbravoERP-2.50MP2/build.xml:493: The following error occurred while
>> executing this line:
>> /tmp/OpenbravoERP-2.50MP2/build.xml:462: The following error occurred while
>> executing this line:
>> /tmp/OpenbravoERP-2.50MP2/src-db/build.xml:42: Compile failed; see the
>> compiler error output for details.
>> ----
>> how to set the source level to 5.0 ????
>> or any ohter hints to get his running....
>> thx for ansering
>> Hermann
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-890-8117 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: annotations are only available if source level is 5.0

Posted by Greg Roodt <gr...@gmail.com>.
Try this:

<javac srcdir="${src}" classpathref="classpath" destdir="${bin}"
target="1.5" source="1.5" />


On Wed, Jul 29, 2009 at 1:00 PM, jann1 <ja...@uni-landau.de> wrote:

> Hello all,
> opensuse11.1, openbravoERP-250MP2:
> ant install.source produces the following error:
> ----
> compile:
>    [javac] Compiling 1 source file to
> /tmp/OpenbravoERP-2.50MP2/src-db/build/classes
>    [javac] ----------
>    [javac] 1. ERROR in
> /tmp/OpenbravoERP-2.50MP2/src-db/src/com/openbravo/db/OpenbravoExcludeFilter.java
> (at line 23)
>    [javac]     @Override
>    [javac]     ^^^^^^^^^
>    [javac] Syntax error, annotations are only available if source level is
> 5.0
>    [javac] ----------
>    [javac] 1 problem (1 error)
> BUILD FAILED
> /tmp/OpenbravoERP-2.50MP2/build.xml:493: The following error occurred while
> executing this line:
> /tmp/OpenbravoERP-2.50MP2/build.xml:462: The following error occurred while
> executing this line:
> /tmp/OpenbravoERP-2.50MP2/src-db/build.xml:42: Compile failed; see the
> compiler error output for details.
> ----
> how to set the source level to 5.0 ????
> or any ohter hints to get his running....
> thx for ansering
> Hermann
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>