In our first year programming class for engineering students, EECS 1021, we’re using modern features like jShell and var. Unfortunately, the OS that our VPL instance sits on came with an older version of Java, so we’ve had to modify our scripts to point to the Java 17 JDK. If you get an error like this
You should consider modifying your scripts to point to Java 17 (JDK17). You’ll need the following files:
- the VPL Run file (the rocket icon): vpl_run.sh (update for JDK17 on EECS VPL server)
- The VPL Evaluate file (the check box icon): vpl_evaluate.sh (update for JDK17 on EECS VPL server)
- The sample student submission: Utils.java (contains the “var” keyword)
- The JUnit test suite: MyTest.java (no update needed)
- The Java file that glues VPL to the JUnit: Main.java (no update needed)
- The secret teacher solution: solution_its_secret.txt (no update needed — identical to Utils.java).
In the end you should see that the student submission compiles and checks for a successful grade.
As always, I’m grateful to Jason Keltz for supporting me through my awkward journey through VPL and Java!
Java lends itself well to the creation of student exercises in systems like VPL due to JUnit. I use this material from Jim Burton to create my JUnit material. And it’s all based on work by an emeritus prof at Smith College (original pages are now gone). However, you may find this example to be a better fit.
James Andrew Smith is a Professional Engineer and Associate Professor in the Electrical Engineering and Computer Science Department of York University’s Lassonde School, with degrees in Electrical and Mechanical Engineering from the University of Alberta and McGill University. Previously a program director in biomedical engineering, his research background spans robotics, locomotion, human birth and engineering education. While on sabbatical in 2018-19 with his wife and kids he lived in Strasbourg, France and he taught at the INSA Strasbourg and Hochschule Karlsruhe and wrote about his personal and professional perspectives. James is a proponent of using social media to advocate for justice, equity, diversity and inclusion as well as evidence-based applications of research in the public sphere. You can find him on Twitter. Originally from Québec City, he now lives in Toronto, Canada.