You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows 10 with openjdk 11, running any of the applications gives the error:
StringIndexOutOfBoundsException: begin 0, end 3, length 2
This comes from a known bug inside the library code for PApplet at this line:
javaVersion = new Float(javaVersionName.substring(0, 3));
It expects the system property "java.version" to be at least length 3, for example "11.0". But in this version of openjdk it is actually something like "11".
A solution: At the beginning of the main() method for any application that uses PApplet, add:
if (System.getProperty("java.version").length() < 3)
System.setProperty("java.version", System.getProperty("java.version") + ".0");
On Windows 10 with openjdk 11, running any of the applications gives the error:
This comes from a known bug inside the library code for PApplet at this line:
It expects the system property "java.version" to be at least length 3, for example "11.0". But in this version of openjdk it is actually something like "11".
A solution: At the beginning of the main() method for any application that uses PApplet, add:
More details are here: processing/processing#5275
The text was updated successfully, but these errors were encountered: