Zorin 18 missing "Open with Java" options from Zorin 16/17

Hey everyone, it's been a while! Last time I posted here was in 2021 to get help with audio issues :sweat_smile:

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??

Make a Right-click on the File and choose the Option ''Properties''. In the opening Window, You should find the Option at the end:

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 :frowning:

You can take a look here to see if the guide can help you:

I've already tried every single thing in this guide, can anybody confirm that the "open with..." menu shows the Java Runtime option on Zorin 18???

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

  1. Install OpenJDK 21 (if you haven’t already):
  • sudo apt update
  • sudo apt install openjdk-21-jdk
  1. 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
  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):

  • /usr/lib/jvm/java-21-openjdk-amd64/bin/java -jar /path/to/yourfile.jargeekrewind+2

Add a right-click “Open with Java”

To simulate “Open with Java Runtime” from the file manager (Nautilus on Ubuntu):

  1. Create a small launcher script, for example:
  • nano ~/bin/open-with-java21.sh

Put in it:

  • #!/usr/bin/env bash
  • /usr/bin/java -jar "$1"

Then make it executable:

  • chmod +x ~/bin/open-with-java21.sh

Because /usr/bin/java points to the default Java, after you set Java 21 with update-alternatives, this script will always use Java 21.tecmint+2

  1. In the file manager:
  • Right‑click your .jar → “Open With Other Application…”.
  • Click “View All Applications” or “Use a custom command” (label may vary).
  • Browse to ~/bin/open-with-java21.sh (or type the path) and select it.
  • Optionally tick “Remember this application for ‘Java archive’ files”.

Now double‑clicking .jar files will run them with Java 21 via your script.

Optional: set JAVA_HOME

If some tools require JAVA_HOME:

  • Create /etc/profile.d/java.sh with:
    • export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which java)))))
    • export PATH=$PATH:$JAVA_HOME/bin
  • Then run:
    • sudo chmod +x /etc/profile.d/java.sh
    • source /etc/profile.d/java.sh

This ensures any shell session uses the same Java 21 runtime as the default java command.linuxcloudvps+2

  1. How to Install Java 21 on Ubuntu 24.04 | RoseHosting
  2. Ubuntu 24.04 : OpenJDK 21 : Install : Server World
  3. https://cloudspinx.com/install-java-21-openjdk-21-on-ubuntu/
  4. How to Install OpenJDK 21 on Ubuntu 24.04 - Geek Rewind
  5. How to Install Java (OpenJDK) on Ubuntu 24.04
  6. https://www.youtube.com/watch?v=s4LAzV-S8OY
  7. Java LTS on Ubuntu 24.04 | LinuxCloudVPS
  8. How To Install Java JRE on Ubuntu 24.04
  9. Install Oracle Java JDK 21 / 25 in Ubuntu 24.04 | 22.04 | 20.04 | UbuntuHandbook
  10. https://www.reddit.com/r/rotp/comments/1f7rmni/ubuntu_2404/