Autograding Java code for computer science assignments
April 26, 2021

Webinar: How to automatically grade Java code and code quality

After the success of our previous webinar on Python Autograding, we answered the many requests to cover all ins and outs of Java Autograding in a webinar too. This Java Autograding webinar was part of our monthly focus groups (on April 23rd of 2021) and can be watched on demand now!

Creating a basic autograded Java assignment in CodeGrade

In the first part of this webinar, CodeGrade's founder and product expert Devin Hillenius discusses ways to design your basic autograded Java assignments in CodeGrade. He goes over three aspects: hand in requirements for Java, compiling Java code and I/O tests for Java.

  • Hand In Requirements are an important aspect of all CodeGrade assignments, but especially for the large projects with specific directory structure you have for Java assignments. Three tactics are discussed: denying all files and specifying the files you want in the root of the submission, allowing all files and denying any class files and denying all files and requiring specific folder structures (e.g. `src/com/codegrade/Class1.java`). A useful tip mentioned in the webinar is to turn off the "Delete leading directories" option for Java submissions in which folder structures are important.
  • Compiling Java code can be done in AutoTest in two ways, either in the per-student setup script or in a separate test. Doing it in the per-student setup script has the benefit that the compiled files are available in all categories, whereas in a separate test you can actually grade the compilation step too. An attentive viewer mentioned that these do not have to exclude each other, and that you can simply grade a compilation step by checking if the compiled files are present or not.
  • Finally, some easy Input and Output tests (I/O tests) are set up for our Sudoku Solver assignment.
Save time by autograding your Java assignments now!

Continue reading

What is Gradescope?

What is Gradescope? An honest explainer of what it does, what it is good at, and when a code-first alternative like CodeGrade fits better. Start free up to 50.

Exam Heartbeat: Live Monitoring for Proctored Coding Exams

Exam Heartbeat detects when students leave the exam window mid-session. Live monitoring for proctored coding exams, no extra setup.

CodeGrade vs CodeRunner: A Moodle Plugin vs a Full Autograding Platform

GitHub Classroom updates have slowed and GitHub now points instructors to Codio. Here's what has actually changed in 2026, what professors are reporting, and what it means for your fall planning.

Sign up to our newsletter