#2633 Java Compatibility Changes for 1.0.70

brian Thu 24 Aug

Up until this point, Fantom has been compiled with JDK 1.6 and targeted 1.5 bytecode.

Given that 1.9 is soon to be released and 1.6 is going on 11 years old, we are going to upgrade our required Java. For the 1.0.70 build which we are planning in next few weeks:

  1. We will require JDK 1.7 for runtime
  2. Fantom will require JDK 1.8 compile to build from source, and the default configuration will require 1.7 to be installed to use as the classpath (we will compile against 1.7 APIs)
  3. The Fantom source was originally written to compile in 1.4, so no use of generics or 1.5+ features (although we did use StringBuilder and a few newer features). We will probably continue to use that style just for consistency. But we will assume that use of 1.7 APIs is ok
  4. For short term we won't be making any bytecode emit changes. Although making 1.7 a requirement opens up the possibility to use invokedynamic bytecode

We've run some preliminary tests on 1.9 and it looks good. It will definitely be a supported runtime. However the 1.9 JDK will not be usable to compile Fantom or Java FFI from source. They have removed rt.jar as part of jigsaw, so there will be some significant development effort to rework how Java FFI classpath works.

Login or Signup to reply.