Skip to main content Skip to local navigation
Home » Category: 'java'

java

Java Graphics and User Interfaces -- in the Terminal

When I first started programming in Java I thought that graphics would be best with a framework like JavaFX. It was a lot more complicated than I thought it would be. I switched to using the Princeton Standard Library with my students and find that it works great for things like graphs, etc. even though […]

jUnit6, part 5: State Saving When Running Repeating Tests

Back when I was a PhD student at McGill, our lab had a rule of thumb when it came to robot tests: if the robot can't repeat the test at least ten times then it can't do it. You can see this in Dave McMordie's thesis, in Ned Moore's thesis, in Neil Neville's thesis and […]

jUnit 6, part 4: automated testing from the command line

When developing a stand-alone Java program all by yourself, it's typically preferable to do so from an IDE. However, a lot of projects rely on automated compiling and testing and this is really best done from the command line. While you may be used to using jUnit from inside an IDE like IntelliJ, it can […]

jUnit 6, part 3: parametric testing external file

Building on the second post on jUnit 6, here is a parametric unit test set up with an external CSV file: This file, test values.csv, has comments and a header line that is to be ignored. It can be included in an IntelliJ project. We assume that a Calculator class is available that contains an […]

jUnit 6, part 2: parametric testing with delimiters and comments

I started examining jUnit 6 in an earlier post. It turns out that in jUnit6, the common separated values data can use delimiters other than commas. Very cool. Before getting into the import of CSV files for testing, let's look at two features that are useful for setting up a bank of tests. We'll assume […]

jUnit 6: unit testing in Java

This past year has seen the release of an update to jUnit, arguably the most important testing framework in software engineering and computer science. Now in its sixth release, jUnit makes a significant jump to eliminating support in anything before Java 17. When I got started with Java in 2020 most of the teaching material […]

jMusic videos

Here are a few videos that relate to Java Music (jMusic) in EECS 1021: Intro to jMusic: Intro to jMusic in Windows 11: Inheritance: Polymorphism: Combining User Input with jMusic:

Some useful things to do with Arduino, Firmata and Java

When contemplating how to use Firmata with Java, consider some of the following things: Your Main Project will look something like this (this is an older video that doesn't quite reflect changes to the updated project): Install Firmata on your device To do any of this you'll need to install Firmata: Using the OLED display […]

Firmata4j: "Index out of bounds"

If you're trying to use Firmata4j and get an Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 0 message, it may be because you downloaded StandardFirmata via the Arduino 2.0 IDE. At this stage, I'm not sure of the cause. I've determined that a solution for this is to use the […]

EECS 1011 and 1021 Lab Kit (2025/26 version)

[as of May 21, 2025, this is a public draft] This kit is updated from 2024/25 edition of the kit with three new sensors, one extra actuator, an extra cable and "crib sheets" for Matlab and Java. The lab kit for the two courses include the following list of items We'll be asking the Bookstore […]