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

The Terminal Is Here: CodeGrade's Editor Grew Up

The Terminal is here in beta: a real Ubuntu command line in CodeGrade's redesigned browser editor. Email support for access and a guided setup session.

You Can Now Limit Copy-Pasting in the CodeGrade Code Editor

Prevent copy-pasting in coding assignments. CodeGrade lets you cap or block pasting in the code editor, per assignment. You set the limit. Start free.

Everything CodeGrade Shipped in Q2 2026

See all 14 CodeGrade releases from Q2 2026: simpler login and enrollment, faster AutoTest setup, a context-aware AI assistant, and exam fixes. Start free.

Sign up to our newsletter