[antlr-interest] ANTLR3 ant task class file problem

Travis Caldwell travis_caldwell2000 at yahoo.com
Thu May 17 17:43:05 PDT 2007


 Hi, 
  
 I noticed on the new ANTLR v3 web site that the ANTLR ANT task was
updated on today (May 17), but the release notes look the same.

 Has this Java 6 issue been fixed?

                              -LS

--- Travis Caldwell <travis_caldwell2000 at yahoo.com> wrote:

> 
>  Hi, 
> 
>  I was attempting to use the ANTLR3 ant task that was uploaded to the
> file sharing site and I get the following error:
> 
>  BUILD FAILED
> java.lang.UnsupportedClassVersionError: Bad version number in .class
> file
> 
>  Googling this list I see that someone previously had the same issue:
> 
> > [antlr-interest] comments on ant task for v3..
> > Eitan Suez eitan.suez at gmail.com
> > Thu Feb 8 14:14:53 PST 2007
> [...]
> > 5. the ant task appears to be built with java 6.
> >  i tried to run a test target and am getting this:
> > BUILD FAILED
> > java.lang.UnsupportedClassVersionError: Bad version number in
> .class 
> file
> 
>  It also looks like there was an attempt to solve this here:
> 
> > [antlr-interest] updated antlr3 ANT task
> >Terence Parr parrt at cs.usfca.edu
> >Sat Feb 10 16:08:49 PST 2007
> [...]
> >       Compiled the antlr3 taks with -source 5 for compatibility  
> with Java 5.
> 
>  I checked the zip that I downloaded and I definitely have the new
> version since the readme in the zip also refers to being compiled
> with
> "-source 5". It also includes the simplecTreeParser example refered
> to
> in the email about the new version.
> 
> The class file looks to like it was built for java 6: 
> 
> $ od -tx1 ANTLR3.class | head
> 0000000 ca fe ba be 00 00 00 32 02 0d 0a 00 ae 01 05 07
>                              ^^
> The major number is 50 decimal which according to this:
> 
> 
>
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm
> 
> Indicates a Java 6 class file.
> 
>  Perhaps the compile should be done with "-source 5 -target 5" in
> order
> to be compatible with both java 5 & 6.
> 
>  I think that "-source 5" may only instruct the compiler to expcet
> java
> 5 source, but it will still emit java 6 class files.
> 
>  Thanks.
> 
>                   _Travis_Caldwell_
> 
> 
> 
> 
> 
> 
>        
>
____________________________________________________________________________________
> Moody friends. Drama queens. Your life? Nope! - their life, your
> story. Play Sims Stories at Yahoo! Games.
> http://sims.yahoo.com/  
> 



       
____________________________________________________________________________________Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php


More information about the antlr-interest mailing list