[ https://issues.apache.org/jira/browse/DERBY-6856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15133874#comment-15133874 ]
Knut Anders Hatlen commented on DERBY-6856: ------------------------------------------- We used to cross-compile the way Dalibor suggested, by setting up a compile classpath that pointed to the old version of the standard libraries, using properties such as j18lib and java18compile.classpath. This mechanism seems to have been removed from trunk, though. We could work around these issues by adding up-casts to force the compiler to create byte code for calling the methods in the Buffer class instead of the new overrides in the ByteBuffer class. That is, we could change {{buffer.clear();}} to {{((Buffer) buffer).clear();}}. And similar for position(), limit(), mark()... It gets a bit messy after a while. I remember we have added similar casts earlier to get cross-compilation to work without a correct compile classpath, but those changes were more limited. I don't remember the specifics of those problems anymore... > Make it possible to build Derby using JDK 9 > ------------------------------------------- > > Key: DERBY-6856 > URL: https://issues.apache.org/jira/browse/DERBY-6856 > Project: Derby > Issue Type: Improvement > Components: Build tools > Affects Versions: 10.12.1.1 > Reporter: Rick Hillegas > Attachments: derby-6856-01-ab-addShardingKey.diff, > derby-6856-01-ac-cleanup.diff > > > Derby can't be built with JDK 9. Java 9 introduces new JDBC classes like > java.sql.ShardingKey and methods which refer to these new classes. > In addition, project Jigsaw has created a new way to name classes (see > http://openjdk.java.net/jeps/220). This breaks the PropertySetter build tool > which we use so that old JVMs can compile Derby and so that Derby can be > compiled to run on old JVMs. > It is likely that we will need to leave this issue open throughout the > development cycle of Java 9. -- This message was sent by Atlassian JIRA (v6.3.4#6332)