[SOLVED] Missing Java on LM 18.2?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
richlion2
Level 2
Level 2
Posts: 83
Joined: Mon Sep 05, 2016 9:00 am

[SOLVED] Missing Java on LM 18.2?

Post by richlion2 »

Hello,

I am a bit lost here. I have one laptop with LM 18.2 which is an old installation (from 18.1) and has been constantly updated and upgraded. I have an application that is in Java and this is what I have installed:
java -fullversion
openjdk full version "1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11"

The application works.

On another computer on which I installed 18.2 directly from a new .ISO download it seems Java is not exactly there:

$ java -fullversion
The program 'java' can be found in the following packages:
* default-jre
* gcj-5-jre-headless
* openjdk-8-jre-headless
* gcj-4.8-jre-headless
* gcj-4.9-jre-headless
* openjdk-9-jre-headless
Try: sudo apt install <selected package>


My first question, where is Java, is it not included in the 18.2 installation?

Second, how to install the proper version? I tried following this link:
https://www.2daygeek.com/install-java-o ... archlinux/#

Used:
sudo apt-get install openjdk-8-jdk

But Java is still not there.

Regards,
Richard
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Missing Java on LM 18.2?

Post by phd21 »

Hi "richlion2",

It would help to know more about your system setup. If you run "inxi -Fxzd" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.

Which Java application is it?
Oracle Java and Open Java installation

The Java runtimes are probably available in the Software Manager or Synaptic Package Manager (SPM).

Install new Oracle Java 8 In Ubuntu, Linux Mint, with links to install previous versions (6,7).
http://www.webupd8.org/2012/09/install- ... a-ppa.html

To install this using the PPA method, open a console terminal, type in, or copy & paste, each line below one by one:

Code: Select all

sudo add-apt-repository ppa:webupd8team/java

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get install oracle-java8-installer
[/color]

For Java9

Code: Select all

sudo apt-get install oracle-java9-installer
[/color]

VIP: Switching between Oracle Java 8 and Java 9
Later on, if you want to switch Oracle Java 9, use the following command (make sure "oracle-java9-installer" package is installed):

Code: Select all

sudo update-java-alternatives -s java-9-oracle
[/color]

And, switch back to Oracle Java 8 using:

Code: Select all

sudo update-java-alternatives -s java-8-oracle
[/color]

If you get some warnings when running these two commands, ignore them.

VIP: Setting Java environment variables
To automatically set up the Java 8 environment variables, you can install the following package:
sudo apt-get install oracle-java8-set-default
-------------------------------------------------------------------------------------------------------------------------
OpenJDK Java 8 has been made into official Ubuntu repositories for 14.10 Utopic and higher.
For Ubuntu 14.04, Ubuntu 12.04, and Linux Mint 17 users here’s how to install it from PPA.
http://ubuntuhandbook.org/index.php/201 ... 12-04-lts/

Code: Select all

sudo add-apt-repository ppa:openjdk-r/ppa

Code: Select all

sudo apt-get update 

Code: Select all

sudo apt-get install openjdk-8-jdk
[/color]

VIP: If you have more than one Java versions installed on your system. Run the command below to set the default Java:

Code: Select all

sudo update-alternatives --config java
[/color]

Type in a number to select a Java version.
And set default Java Compiler by running:

Code: Select all

sudo update-alternatives --config javac
[/color]

4. Finally check out current Java version by running:

Code: Select all

java -version
It outputs something like this:

openjdk version "1.8.0_01-internal"
OpenJDK Runtime Environment (build 1.8.0_01-internal-b04)
OpenJDK 64-Bit Server VM (build 25.40-b08, mixed mode)

Hope this helps ...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
richlion2
Level 2
Level 2
Posts: 83
Joined: Mon Sep 05, 2016 9:00 am

Re: Missing Java on LM 18.2?

Post by richlion2 »

I would love to use the Software Manager, but how do I find it?
First - programs/packages are not sorted by name and there are thousands of them.
Second - the search button has never worked, I type a text like "java" and press the search button and nothing happens.

I used your instructions and still no luck, here are the results (Sorry, Polish version):

Veriton-X2610G ~ $ sudo add-apt-repository ppa:openjdk-r/ppa
[sudo] password for User:
Masz zamiar dodać następujące PPA:
Więcej informacji: https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa
Wciśnij Enter, aby kontynuować; Crtl+C, aby anulować

Executing: /tmp/tmp.NCm9AIMpNa/gpg.1.sh --keyserver
hkp://keyserver.ubuntu.com:80
--recv-keys
86F44E2A
gpg: requesting key 86F44E2A from hkp server keyserver.ubuntu.com
gpg: key 86F44E2A: public key "Launchpad OpenJDK builds (all archs)" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1

Veriton-X2610G ~ $ sudo apt-get update
Pobieranie:1 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu xenial InRelease [17.5 kB]
Stary:2 http://archive.canonical.com/ubuntu xenial InRelease
Stary:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Pobieranie:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Pobieranie:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Stary:6 http://ppa.launchpad.net/webupd8team/tor-browser/ubuntu xenial InRelease
Ign:7 http://packages.linuxmint.com sonya InRelease
Pobieranie:8 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Pobieranie:9 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu xenial/main Sources [2,004 B]
Pobieranie:10 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu xenial/main amd64 Packages [4,564 B]
Pobieranie:11 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu xenial/main i386 Packages [4,572 B]
Pobieranie:12 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu xenial/main Translation-en [1,452 B]
Stary:13 http://packages.linuxmint.com sonya Release
Stary:15 https://repo.skype.com/deb stable InRelease
Pobrano 337 kB w 5s (57.1 kB/s)
Czytanie list pakietów... Gotowe


Veriton-X2610G ~ $ sudo apt-get install openjdk-8-jdk

Czytanie list pakietów... Gotowe
Budowanie drzewa zależności
Odczyt informacji o stanie... Gotowe
openjdk-8-jdk is already the newest version (8u131-b11-2ubuntu1.16.04.3).
0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.


Veriton-X2610G ~ $ sudo update-alternatives --config java
... only one version, nothing to configure.

Veriton-X2610G ~ $ java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-5-jre-headless
* openjdk-8-jre-headless
* gcj-4.8-jre-headless
* gcj-4.9-jre-headless
* openjdk-9-jre-headless
Try: sudo apt install <selected package>


The program I am using is for my Forex trading platform in Java downloaded from here:
https://www.oanda.com/forex-trading/pla ... e-platform
richlion2
Level 2
Level 2
Posts: 83
Joined: Mon Sep 05, 2016 9:00 am

Re: [SOLVED] Missing Java on LM 18.2?

Post by richlion2 »

Solved:

installed LM 18.1, performed ugrade to 18.2.

You can test it, go to
https://www.oanda.com/forex-trading/pla ... e-platform

scroll down to where the Download button is.

This will pull the file fxTrade_installer.tar, when you inpack it it's a file fxTrade_installer.sh.
Run the script, this will create a shortcut in your Desktop folder. You then try and launch it. If there is a problem, an error shows immediately.
if Java is installed then you will see the application launch as in the attachment.

Regards,
Richard
User avatar
asandl
Level 1
Level 1
Posts: 48
Joined: Sun Jun 10, 2018 5:05 pm
Location: Georgia (USA)

Re: Missing Java on LM 18.2?

Post by asandl »

Hope this helps ...
This worked for me on 6-16-18. Needed to install JRE to use LibreOffice macros. Thanks very much.
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Missing Java on LM 18.2?

Post by phd21 »

Hi asandl,

You are welcome from all of us that replied...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
Locked

Return to “Software & Applications”