/usr/bin/java -jar fails to run java file in 19.1

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
elmarts
Level 3
Level 3
Posts: 136
Joined: Mon Aug 08, 2016 6:46 pm

/usr/bin/java -jar fails to run java file in 19.1

Post by elmarts » Tue Jun 04, 2019 8:22 am

This is locked: how to run jar files etc. topic - recommends using open with other application and inserting this command:
/usr/bin/java -jar But alas it fails also.

The file exists as a link to /etc/alternatives/java, but going there merely results in finding a link that references the same /etc/alternatives/java

All I want to do is double click on the jar file and have it run.
- Elmar
Dual boot win 7 & Linux Mint
Release Linux Mint 19.1 Tessa 64-bit
Kernel Linux 5.0.0-20-generic x86_64
MATE 1.20.1

elmarts
Level 3
Level 3
Posts: 136
Joined: Mon Aug 08, 2016 6:46 pm

Re: /usr/bin/java -jar fails to run java file in 19.1

Post by elmarts » Fri Jul 12, 2019 3:07 pm

No help? No replies? Any suggestions as to where I can go to get help?
- Elmar
Dual boot win 7 & Linux Mint
Release Linux Mint 19.1 Tessa 64-bit
Kernel Linux 5.0.0-20-generic x86_64
MATE 1.20.1

User avatar
karlchen
Level 20
Level 20
Posts: 11342
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: /usr/bin/java -jar fails to run java file in 19.1

Post by karlchen » Fri Jul 12, 2019 5:27 pm

Hello, elmarts.

Please, open a terminal window. Execute the following commandlines. Mark the commandlines and the output which they display. Press <Ctrl><shift>c to copy the marked lines into the clipboard. Paste it into your next reply.

Here are the commandlines to execute, please:

Code: Select all

ls -l /usr/bin/java
(should point to /etc/alternatives/java)

Code: Select all

ls -l /etc/alternatives/java
(should point to the real location of the executable java)

Regards,
Karl
Image
Linux Mint 19.2 32-bit xfce Desktop, Total Commander 9.22a 32-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

elmarts
Level 3
Level 3
Posts: 136
Joined: Mon Aug 08, 2016 6:46 pm

Re: /usr/bin/java -jar fails to run java file in 19.1

Post by elmarts » Thu Aug 01, 2019 5:29 pm

As requested -
ets@Shinobi-L ~ $ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Jun 21 2017 /usr/bin/java -> /etc/alternatives/java
ets@Shinobi-L ~ $ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 43 Apr 17 11:15 /etc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-amd64/bin/java
ets@Shinobi-L ~ $

- Elmar

p.s. the java program of concern is the guncash back up program BackupGnuCash.jar
It just won't run any more since the upgrade from 18.3 to 19.1, and the open with options I get are java 11 and java 8, neither of which do anything.
- Elmar
Dual boot win 7 & Linux Mint
Release Linux Mint 19.1 Tessa 64-bit
Kernel Linux 5.0.0-20-generic x86_64
MATE 1.20.1

User avatar
phd21
Level 19
Level 19
Posts: 9319
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: /usr/bin/java -jar fails to run java file in 19.1

Post by phd21 » Thu Aug 01, 2019 5:45 pm

Hi elmarts,

Install these

Code: Select all

sudo apt-get install openjdk-8-jre openjfx wget 
Make Java 8 the default using the command below

Code: Select all

sudo update-alternatives --config java
FYI: I have to reset Java 8 as my default using the command above after any updates that include Java.

Sample command
java -jar /path-to/BackupGnuCash.jar

BackupGnuCashLinux: Backup GnuCash for Linux (using openjdk + openjfx)
https://github.com/goodvibes2/BackupGnuCashLinux


*** Update: I was not aware of this application before your post.

I just tried this with opensource Java 8 (openjdk) and it did not work, but it did work with Oracle's Java 8 using file manager open with Java 8. Might have to set Java Home and environment variables to Java 8.

See this post and the last replies for installing Oracle's Java 8.
Application .zip install - Linux Mint Forums
viewtopic.php?f=47&t=291916&hilit=flashpap



Hope this helps ...
.
BackupGnuCash Linux
BackupGnuCash Linux
Phd21: Mint KDE 18.3 & 19, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

Post Reply

Return to “Software & Applications”