Hi Richard,
To avoid breaking lots of old questions that have (support file jar) incompatibilities with a new JDK, we installed JDK 21 alongside the old JDK and wanted to add a new question prototype for JDK 21.
Here's what the developer said:
"I am trying to
use two versions of java in coderunner using the same jobe server. On the jobe
server I have
Supported
languages:
c: 11.5.0
cpp: 11.5.0
java21: 21.0.7
java: 1.8.0_452
nodejs: 22.16.0
php: 8.0.30
python3: 3.11.11
I created this
by copying /application/libraries/java_task.php to
/application/libraries/java21_task.php and changing /etc/alternatives/java to
/etc/alternatives/java21
In moodle I
copied the BUILT_IN_PROTOTYPE_java_class to create a java21 version and built a
question based on that. I am getting the below error where is seems coderunner
is using the language name ‘java21’ for the file extension.
Syntax Error(s)
error: Class names, '__tester__.java21', are only accepted if annotation processing is explicitly requested
1 error
Am I using the wrong approach or can someone help with this approach to allow multiple java version questions on the same system so we can create new questions and maintain the old.
"We don't seem to be linking correctly to the new JDK. If we make the question prototype (or old question) sandbox language java21 we get the same error.
Is what we're trying to do possible and would you have any insight as to what we're doing wrong?Thank you,
Anton