db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: Using enum keyword in derby source files
Date Tue, 01 Jun 2010 19:16:58 GMT
Nirmal Fernando wrote:
> Hi All,
> I'm getting ant compilation errors, when I used "enum" keyword in a
> new class, under derby code.
> I'm using jdk 1.6.
> How can I get rid of this?
> Thanks.
Hi Nirmal,

Most of Derby code is expected to run on jdk 1.4. That means the code 
cannot contain language features which were introduced in Java 5. In 
addition, the code should not reference libraries which were introduced 
in Java 5 or Java 6. There are some exceptions to these rules. That is, 
there is some code which only runs on more recent VMs and which is 
loaded only if the VM is advanced enough. It sounds as though you are 
trying to use Java 5 features in a piece of code which ought to run on 
jdk 1.4. Probably the best solution would be to rewrite your code to 
avoid the Java 5 features.

Hope this helps,

View raw message