Fixed for JEP-223 support

This commit is contained in:
Mathias Herberts
2018-08-19 12:15:29 +02:00
parent 86e2d0f6bb
commit a6c7f22e91
+4 -1
View File
@@ -119,8 +119,11 @@ public class PApplet implements PConstants {
String version = javaVersionName;
if (javaVersionName.startsWith("1.")) {
version = version.substring(2);
javaPlatform = parseInt(version.substring(0, version.indexOf('.')));
} else {
// Remove -xxx and .yyy from java.version (@see JEP-223)
javaPlatform = parseInt(version.replaceAll("-.*","").replaceAll("\\..*",""));
}
javaPlatform = parseInt(version.substring(0, version.indexOf('.')));
}
/**