mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Fixed for JEP-223 support
This commit is contained in:
@@ -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('.')));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user