Glam Prestige Journal

Bright entertainment trends with youth appeal.

Ubuntu 18.04 user here!

I'm going to use Java to program embedded systems such as the boards:

  • Raspberry Pi
  • STM32429I-EVAL
  • 32F746GDISCOVERY
  • Intel Galileo Gen. 2.

They are not so many, but they are still very powerfull and can be used to a lot of things for industrial applications. More boards will come in the future.

Anyway. I have some trouble when to install the Java ME SDK (Source Development Kit).

What I did first is to install OpenJDK 11

sudo apt-get install openjdk-11-jdk

I checked the version

hp@hp-HP-Z400-Workstation:~/Hämtningar$ java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.2)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.2, mixed mode)
hp@hp-HP-Z400-Workstation:~/Hämtningar$ 

And then I checked where I installed the OpenJDK

hp@hp-HP-Z400-Workstation:~$ readlink -f $(which java)
/usr/lib/jvm/java-11-openjdk-amd64/bin/java
hp@hp-HP-Z400-Workstation:~$ cd /usr/lib/jvm/
hp@hp-HP-Z400-Workstation:/usr/lib/jvm$ ls
java-1.11.0-openjdk-amd64 java-11-openjdk-amd64
hp@hp-HP-Z400-Workstation:/usr/lib/jvm$ 

So there are two folders of my OpenJDK 11:

  • java-1.11.0-openjdk-amd64
  • java-11-openjdk-amd64

Then I tried to install the Java ME SDK 8.3 for Ubuntu Linux

  • oracle-jmesdk-8-3-rr-linux-bin.sh

I downloaded the file and run it:

hp@hp-HP-Z400-Workstation:~/Hämtningar$ sudo sh oracle-jmesdk-8-3-rr-linux-bin.sh
[sudo] lösenord för hp:
Configuring the installer...
Searching for JVM on the system...
Java Runtime Environment (JRE) was not found at the specified location
Preparing bundled JVM ...
Extracting installation data...
Running the installer wizard...

Then I got this installation wizard on the screen. Notice that this wizard won't recognize any JDK from the folders java-1.11.0-openjdk-amd64 or java-11-openjdk-amd64

enter image description here

I also tried to install an older version for Oracle JDK.

sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get install oracle-java10-installer

And I checked the version:

hp@hp-HP-Z400-Workstation:~/Hämtningar$ java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
hp@hp-HP-Z400-Workstation:~/Hämtningar$

And also the installation:

hp@hp-HP-Z400-Workstation:~$ readlink -f $(which java)
/usr/lib/jvm/java-10-oracle/bin/java
hp@hp-HP-Z400-Workstation:~$ cd /usr/lib/jvm/
hp@hp-HP-Z400-Workstation:/usr/lib/jvm$ ls
java-10-oracle
hp@hp-HP-Z400-Workstation:/usr/lib/jvm$ 

I tried the same installation wizard again:

enter image description here

Question:

Why can't the installation wizard for Java ME SDK recognize neither OracleJDK or OpenJDK?

3

1 Answer

Here is the solution.

I installed the OpenJDK 8 and OpenJDK 11

sudo apt install openjdk-11-jdk openjdk-8-jdk

Then I tried to run the installation wizard again:

enter image description here

It worked! OpenJDK 8 is the right JDK to use with Java ME 8.3.

Two more issues for Oracle:

  1. OpenJDK 8 will be out of updates at Januari 2019 for non-commercial users.
  2. When I tried the java -version command if found this:

     hp@hp-HP-Z400-Workstation:~/Hämtningar$ java -version openjdk version "10.0.2" 2018-07-17 OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.2) OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.2, mixed mode) hp@hp-HP-Z400-Workstation:~/Hämtningar$ 

I don't know why it stands OpenJDK 10, when I installed both OpenJDK 8 and OpenJDK 11.

7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy