Project

General

Profile

Actions

How to set the language level » History » Revision 2

« Previous | Revision 2/3 (diff) | Next »
Henning Blohm, 13.05.2014 13:22


How to set the language level (#1029)

Z2 compiles Java code (using a built-in Eclipse Java Compiler). Typically, you do not need to worry about language levels, as by default, Z2 simply sticks to the version of the Java Development Kit (or Java Runtime Environment) it is currently executed with.

That is, if you run a Java 6 JDK, then Z2 will compile for Java 6, if you run a Java 7 JDK, Z2 will compile for Java 7.

Note that Java 8 is not supported at the time of writing.

The language level used by the compiler can however be specified using the system property com.zfabrik.java.level.

The system property, if set, must match "6" or "7" at this time. Speficying a value of "7" while running under Java 6 will lead to runtime errors!

Updated by Henning Blohm almost 10 years ago · 2 revisions