Ubuntu – How to install and run CPUSim 4.0.11 on Ubuntu 18.04 LTS

18.04java

I'm going according to the steps mentioned on the cs colby this site.

First, I installed java on my system by typing the following commands-

sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get update
sudo apt-get install oracle-java10-set-default
sudo apt install oracle-java10-set-default

Screenshot of java version

Then, according to the instructions, I downloaded the .zip file, extracted it and then in the terminal typed

java -cp .:richtextfx-fat-0.6.10.jar:reactfx-2.0-MR.jar -jar CPUSim-4.0.11.jar

But this didn't work. Here is a screenshot of command 1 terminal.

Here is a screenshot of all the files that are there in the CPUSim folder,
CPUSim 4.0.11 contents

On observing the names of the folders present, I thought that the previous command was wrong. So I tried the following ones,

java -cp .:richtextfx-fat-0.6.10.jar:reactfx-2.0-M4.jar -jar CPUSim-4.0.11.jar
java -cp .:richtextfx-0.6.10.jar:reactfx-2.0-M4.jar -jar CPUSim-4.0.11.jar

But none of them seems to work. Now when I click on the CPUSim-4.0.11.jar file, nothing happens.
I have just switched to Ubuntu from Windows 10, and have a very little knowledge about how things work here. Please tell me how I could install and run CPUSim 4.0.11 on Ubuntu 18.04 LTS.

Best Answer

So we have downloaded the application:

cd ~/Downloads
wget http://www.cs.colby.edu/djskrien/CPUSim/CPUSim4.0.11.zip
unzip CPUSim4.0.11
cd CPUSim4.0.11

Then install OpenJDK 8 and OpenJFX

sudo apt-get install openjdk-8-jre openjfx

After that you should change command to the following:

java -cp .:richtextfx-0.6.10.jar:reactfx-2.0-M4.jar -jar CPUSim-4.0.11.jar \
-m SampleAssignments/Wombat1.cpu -t SampleAssignments/W1-0.a

It will launch and you can use it:

CPUSim