Skip to content

Commit

Permalink
Fixes strategy that finds out if running on a JVM older than JDK8.
Browse files Browse the repository at this point in the history
JDK9 defines a new numbering scheme for its version, it no longer
follows the 1.x format. JDK9 uses 9.x.y.z instead.

Fixes groovyfx-project#52
  • Loading branch information
aalmiray committed Oct 6, 2016
1 parent 863d623 commit 9d98c0e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/groovy/groovyx/javafx/JdkUtil.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ package groovyx.javafx

class JdkUtil {
static boolean jdkIsBefore8() {
System.properties['java.version'][0..2].toFloat() < 1.8f
String version = System.properties['java.version']
if (version.startsWith('1')) {
version[0..2].toFloat() < 1.8f
} else {
false
}
}
}

0 comments on commit 9d98c0e

Please sign in to comment.