File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
java/src/processing/mode/java/runner Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -774,10 +774,11 @@ public static boolean handleCommonErrors(final String exceptionClass,
774
774
err .println ("and your code should be rewritten in a more efficient manner." );
775
775
776
776
} else if (exceptionClass .equals ("java.lang.UnsupportedClassVersionError" )) {
777
+ int javaVersion = Runtime .version ().feature ();
777
778
listener .statusError ("UnsupportedClassVersionError: A library is using code compiled with an unsupported version of Java." );
778
- err .println ("This version of Processing only supports libraries and JAR files compiled for Java 1.8 or earlier." );
779
- err .println ("A library used by this sketch was compiled for Java 1.9 or later, " );
780
- err .println ("and needs to be recompiled to be compatible with Java 1.8 ." );
779
+ err .println ("This version of Processing only supports libraries and JAR files compiled for Java " + javaVersion + " or earlier." );
780
+ err .println ("A library used by this sketch was compiled for Java " + ( javaVersion + 1 ) + " or later, " );
781
+ err .println ("and needs to be recompiled to be compatible with Java " + javaVersion + " ." );
781
782
782
783
} else if (exceptionClass .equals ("java.lang.NoSuchMethodError" ) ||
783
784
exceptionClass .equals ("java.lang.NoSuchFieldError" )) {
You can’t perform that action at this time.
0 commit comments