Hey everyone, it's been a while! Last time I posted here was in 2021 to get help with audio issues
That same laptop had Zorin 16, updated to 17. I had a .jar file that I easily made executable within file properties. Then I'd just double click on it and it would run.
I recently bought a Thinkpad T480 and decided to install Zorin 18 on it.
On Zorin 18 the menu is different and doesn't have the "Allow executing file as program" checkbox.
Also when you go to the "Open with..." right click menu, Java just doesn't show up there.
When I run "java -version" inside a terminal I get:
Zorin 17: openjdk version "11.0.28" 2025-07-15
Zorin 18: openjdk version "21.0.8" 2025-07-15
Does the version difference have anything to do with this? or did something change in version 18??
Oh yeah I forgot to mention, sorry. I found that option but it does nothing. ´Open with' doesn't show Java at all and double clicking the .jar file only opens the contents in the file explorer
Don't know if this is repetition, but used Perplexity search engine in zen browser which came back with (Zorin 18 is fork of Ubuntu 24.04, hence used in search criteria):
To “open with Java runtime” on Ubuntu 24.04 using Java 21.0.8, you basically need Java 21 installed, set as the default, and then associate .jar files or use a small launcher script. Here is a concise, practical way to do it.
Install and verify Java 21
Install OpenJDK 21 (if you haven’t already):
sudo apt update
sudo apt install openjdk-21-jdk
Make sure Java 21 is the default:
sudo update-alternatives --config java
Choose the entry that points to java-21 (for example /usr/lib/jvm/java-21-openjdk-amd64/bin/java).server-world+1
Confirm the version:
java -version
It should show something like openjdk version "21.0.x".cloudspinx+2
Run a .jar with Java 21
To run a .jar file explicitly with Java 21:
java -jar /path/to/yourfile.jar
If you have multiple Java versions, you can always use the full path to Java 21’s binary (example):