PatrikCavina Active Member Licensed User Longtime User Feb 15, 2019 #1 I'm building a virtual machine with debian 9 to use like VPS. I'm trying to install openJDK11 but i can't find the package and a good tutorial to install it and run apps compiled with openJDK 11. Has anyone managed to install openjdk11 on a debian machine? If so, please explain how you did it Thanks
I'm building a virtual machine with debian 9 to use like VPS. I'm trying to install openJDK11 but i can't find the package and a good tutorial to install it and run apps compiled with openJDK 11. Has anyone managed to install openjdk11 on a debian machine? If so, please explain how you did it Thanks
xulihang Well-Known Member Licensed User Longtime User Feb 15, 2019 #2 The default jdk version on Debian 9 is OpenJDK 8. You can manually download OpenJDK 11 binary files here: http://jdk.java.net/11/ Upvote 0
The default jdk version on Debian 9 is OpenJDK 8. You can manually download OpenJDK 11 binary files here: http://jdk.java.net/11/
PatrikCavina Active Member Licensed User Longtime User Feb 15, 2019 #3 I downloaded and extracted it with command "tar xvf openjdk-11.0.2_linux-x64_bin.tar.gz" in folder: /opt/java. I set the environment variable JAVA_HOME with the location of java folder and i've added it to PATH variable. export JAVA_HOME="/opt/java/jdk-11.0.2" export PATH=$PATH:$JAVA_HOME/bin Click to expand... But if i run command: java -version, this is the result: openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode) Click to expand... Instead if i run command: javac -version, this is the result: javac 11.0.2 Click to expand... Any Tips? Last edited: Feb 15, 2019 Upvote 0
I downloaded and extracted it with command "tar xvf openjdk-11.0.2_linux-x64_bin.tar.gz" in folder: /opt/java. I set the environment variable JAVA_HOME with the location of java folder and i've added it to PATH variable. export JAVA_HOME="/opt/java/jdk-11.0.2" export PATH=$PATH:$JAVA_HOME/bin Click to expand... But if i run command: java -version, this is the result: openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode) Click to expand... Instead if i run command: javac -version, this is the result: javac 11.0.2 Click to expand... Any Tips?
Daestrum Expert Licensed User Longtime User Feb 15, 2019 #4 Look here https://www.mkyong.com/linux/debian-change-default-java-version/ It may solve your problem. Upvote 0
Look here https://www.mkyong.com/linux/debian-change-default-java-version/ It may solve your problem.
PatrikCavina Active Member Licensed User Longtime User Feb 15, 2019 #5 Using command: apt-get install openjdk-11-jdk openjdk-11-jre Click to expand... The result is: Unable to locate package openjdk-11-jdk Unable to locate package openjdk-11-jre Click to expand... Upvote 0
Using command: apt-get install openjdk-11-jdk openjdk-11-jre Click to expand... The result is: Unable to locate package openjdk-11-jdk Unable to locate package openjdk-11-jre Click to expand...
Daestrum Expert Licensed User Longtime User Feb 15, 2019 #6 Sorry I meant this bit on the page 2. Update Java alternative path : $ sudo update-alternatives --config java Also there is no jre for Java 11 Upvote 0
Sorry I meant this bit on the page 2. Update Java alternative path : $ sudo update-alternatives --config java Also there is no jre for Java 11
Erel B4X founder Staff member Licensed User Longtime User Feb 17, 2019 #7 Note that JDK 11 is not enough for UI apps. You need to include OpenJDK as well. Complete packages for Windows, Mac and Linux are available here: https://www.b4x.com/android/forum/t...the-simplest-way-to-distribute-ui-apps.99835/ Upvote 0
Note that JDK 11 is not enough for UI apps. You need to include OpenJDK as well. Complete packages for Windows, Mac and Linux are available here: https://www.b4x.com/android/forum/t...the-simplest-way-to-distribute-ui-apps.99835/
PatrikCavina Active Member Licensed User Longtime User Feb 17, 2019 #8 Can i set OpenJDK 11 (for linux) as default? Or i must set JAVA_HOME environment variable to point to jdk-11.0.1, and run all jar programs with command "$JAVA_HOME/bin java -jar filename.jar"? Upvote 0
Can i set OpenJDK 11 (for linux) as default? Or i must set JAVA_HOME environment variable to point to jdk-11.0.1, and run all jar programs with command "$JAVA_HOME/bin java -jar filename.jar"?
Erel B4X founder Staff member Licensed User Longtime User Feb 18, 2019 #9 I'm not a Linux expert. Try this: https://askubuntu.com/a/498227 I usually create simple script files that start the servers (or any other app) with the correct Java version. Upvote 0
I'm not a Linux expert. Try this: https://askubuntu.com/a/498227 I usually create simple script files that start the servers (or any other app) with the correct Java version.
PatrikCavina Active Member Licensed User Longtime User Feb 18, 2019 #10 All configured, your link and this link: https://www.digitalocean.com/commun...install-oracle-java-on-a-debian-or-ubuntu-vps, have solved my problems Upvote 0
All configured, your link and this link: https://www.digitalocean.com/commun...install-oracle-java-on-a-debian-or-ubuntu-vps, have solved my problems