Hello,
I'm using CodeRunner in a Moodle.
CodeRunner version: 5.2.2
Moodle version 4.4.1
I'd like to run students' java programs with external jar files.
I uploaded four external jar files in the "support files" and tried to set compile args and interpreter args to use those jar files in the "sandbox parameters" as follows:
{"compileargs": ["-cp", "junit-platform-commons_1.10.2.jar:junit-jupiter-api_5.10.2.jar:org.opentest4j_1.3.0.jar:org.apiguardian_1.1.2.v20211018-1956.jar"],
"interpreterargs": ["-cp", ".:junit-platform-commons_1.10.2.jar:junit-jupiter-api_5.10.2.jar:org.opentest4j_1.3.0.jar:org.apiguardian_1.1.2.v20211018-1956.jar", "-Xss64m", "-Xmx4g"]}
However, when I tried to save the question, an error message is shown.
"Error writing to database"
I tried to set only compile args in the "sandbox parameters" as like,
{"compileargs": ["-cp", "junit-platform-commons_1.10.2.jar:junit-jupiter-api_5.10.2.jar:org.opentest4j_1.3.0.jar:org.apiguardian_1.1.2.v20211018-1956.jar"]}.
Ths time, the question was successfully saved and when I tried to run the program, it was compiled without any problem. Of course it failed to run without interpreter args.
Next I tried to set only interpreter args in the "sandbox parameters" as like,
{"interpreterargs": ["-cp", ".:junit-platform-commons_1.10.2.jar:junit-jupiter-api_5.10.2.jar:org.opentest4j_1.3.0.jar::org.apiguardian_1.1.2.v20211018-1956.jar", "-Xss64m", "-Xmx4g"]}
Ths time, the question was also successfully saved. Of course it failed to compile without compile args.
It looks like that only one parameter can be set in the "sandbox parameters".
Is there any mistake in my work?
Please help me. Thanks!