If, like me, you've got a newer version of Java installed on your system and couldn't run ModelChecker.jar
without issues, follow this cheeky li'l guide to get set up.
Firstly, you're gonna need to get Java 1.8 if you don't already. This can be found here. Unfortunately, you need to make an Oracle account to download it :(
After installing, run /usr/libexec/java_home -V
- this should list all of the versions you have installed. Check that there is 1.8.0_221, x86-64: "Java SE 8"
listed.
Once you've got that sussed, go into your SWEN324HandBuild folder.
Make a new text file, and name it run.command
.
The contents of this file should be:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_221`
java -jar ModelChecker.jar
Save that, then run chmod u+x run.command
in your terminal (within the SWEN324HandBuild folder).
Now, you should be able to launch the application via ./run.command
.
The script will set your java version for that instance of your terminal to be 1.8, and then launch the program. If you need to use the later versions of Java again, just make sure you quit the terminal first!
To make sure that you've got the right version set, try running java -version
in your terminal. This should list whichever version is set to your default.
Hopefully, in a new terminal window this'll be whatever version you want to normally use, but after running the script it should show version 1.8. This should reset each time your terminal application is quit.