Linux Mint, Install Java, Run RARS

To install Java on Linux Mint, the easiest and most stable approach is to use the built-in apt package manager. For most users, OpenJDK (the open-source implementation) is highly recommended over Oracle's closed-source version because it is native, secure, and updates automatically through your system.

Step 1: Update Your System

Before installing any software, ensure your package index is fully up to date:

sudo apt update

optionally

sudo apt upgrade

Step 2: Choose Your Java Package

Depending on what you want to do with Java, you will need either the JRE (to run apps) or the JDK (to develop apps).

Note: The following automatically installs the standard, stable OpenJDK version optimized for your specific Linux Mint release.

To run Java applications (JRE only):

sudo apt install default-jre

To develop Java applications (JDK + JRE):

sudo apt install default-jdk

Step 3: Verify the Installation

Confirm that Java was installed correctly by checking its version number:

java -version

 


Linux Mint (how I got it to work)


To install default_jdk...

sudo apt install default-jdk

THIS ERROR WAS DISPLAYED WHEN I TRIED TO RUN RAS1_6.JAR AFTER
INSTALLING DEFAULT_JDK AND DOUBLE-CLICKED ON THE JAR FILE

...for security reasons running the file '/home/tom/risc-v/ras1_6.jar' has been blocked.

to run it, I could do the following...

cd work directory java -jar ./ras1_6.jar

to make it behave like a standard executable (run when double clicked)

Right Click (on jar file) > Open With > Other Applications... > custom Application > '/usr/bin/jave -jar' [set as default] > [OK]