Page 1 of 1

Install Java JDK and Set Environment Variables

Posted: 28 Dec 2019 01:06
by jsvenancio
Good evening.
Yesterday I decided to pay for two programming courses on the Udemy website.
One Android application creation course lasting just over thirty hours and the other Python programming course, also lasting just over thirty hours.

I am starting the android application creation course and would like to take this course in my SolydX installation.

Is there a way to install Java JDK and Java JRE and still set the environment variables?

Re: Install Java JDK and Set Environment Variables

Posted: 28 Dec 2019 09:04
by Arjen Balfoort
I do not develop in Java, but Java is installed by default on SolydXK.

In SolydXK 10:

Code: Select all

$ java -version
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.5+10-post-Debian-1deb10u1, mixed mode, sharing)
I found this URL to set environment variables: https://www.2daygeek.com/setup-java-env ... -opensuse/

Note that the java binary is not in /usr/bin. This is a symlink. It can be found like this:

Code: Select all

$ ls -lh /usr/bin/java
lrwxrwxrwx 1 root root 22 Apr 27  2016 /usr/bin/java -> /etc/alternatives/java
$ ls -lh /etc/alternatives/java
lrwxrwxrwx 1 root root 43 Sep 10  2018 /etc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-amd64/bin/java
So, this is the binary you need to use in the environment variables: /usr/lib/jvm/java-11-openjdk-amd64/bin/java

Re: Install Java JDK and Set Environment Variables

Posted: 29 Dec 2019 13:55
by jsvenancio
***************************************************************
Good afternoon.

Yes, SolydXK is programmed in Python if I'm not in error.
The second course I am going to do is python as I posted when I created the topic.

Code: Select all

~$ java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-8u232-b09-1~deb9u1-b09)
OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)
-$ 
Arjen Balfoort wrote:
28 Dec 2019 09:04
I do not develop in Java, but Java is installed by default on SolydXK.

In SolydXK 10:

Code: Select all

$ java -version
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.5+10-post-Debian-1deb10u1, mixed mode, sharing)
***************************************************************
Thanks.
I'll put it into practice.
Arjen Balfoort wrote:
28 Dec 2019 09:04
I found this URL to set environment variables: https://www.2daygeek.com/setup-java-env ... -opensuse/
***************************************************************
Is this right?

Code: Select all

~$ ls -lh /usr/bin/java
lrwxrwxrwx 1 root root 22 abr 27  2016 /usr/bin/java -> /etc/alternatives/java
~$ ls -lh /etc/alternatives/java
lrwxrwxrwx 1 root root 46 abr 27  2016 /etc/alternatives/java -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
~$ 
Arjen Balfoort wrote:
28 Dec 2019 09:04
Note that the java binary is not in /usr/bin. This is a symlink. It can be found like this:

Code: Select all

$ ls -lh /usr/bin/java
lrwxrwxrwx 1 root root 22 Apr 27  2016 /usr/bin/java -> /etc/alternatives/java
$ ls -lh /etc/alternatives/java
lrwxrwxrwx 1 root root 43 Sep 10  2018 /etc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-amd64/bin/java
So, this is the binary you need to use in the environment variables: /usr/lib/jvm/java-11-openjdk-amd64/bin/java
***************************************************************

Re: Install Java JDK and Set Environment Variables

Posted: 29 Dec 2019 22:16
by ilu
A sua saída java --version parece a SolydX9. Você deve atualizar para SolydX10.

Razões:
- Python modificações na versão 3.6 - você precisará de f-strings e aqueles vieram com python 3.6 na debian 10
(você pode trabalhar sem f-strings em python 3.5 mas é uma chatice porque estes cursos geralmente os requerem)
- Java modificações de 1.8 para 1.10 (Eu não uso Java por isso não sei detalhes)

------------------------
Your java --version output looks like SolydX9. You should update to SolydX10.

Reasons:
- Python changes in v 3.6 - you will need f-strings and those came with python 3.6 in debian 10
(you can work around f-strings with python 3.5 but it's a pain because these courses usually require them)
- Java changes from 1.8 to 1.10 (I don't do Java so I don't know details)

Translated with help from https://www.deepl.com/translator

Re: Install Java JDK and Set Environment Variables

Posted: 04 Jan 2020 21:21
by jsvenancio
Tenho procurado atualizações para passar para a SolydX10 mas não recebo essas atualizações.

Estará a escapar-me alguma coisa?

Code: Select all

********@*****:~$ sudo su
[sudo] password for **********: 
root@pr07071p3:/home/jsvenancio# apt update
Ign:1 http://deb.debian.org/debian stretch InRelease
Hit:2 http://security.debian.org stretch/updates InRelease
Hit:3 http://deb.debian.org/debian stretch-updates InRelease
Hit:4 http://deb.debian.org/debian stretch-backports InRelease
Hit:5 http://deb.debian.org/debian stretch Release        
Hit:7 https://repository.solydxk.com solydxk-9 InRelease  
A ler as listas de pacotes... Pronto
***@*******# apt upgrade
A ler as listas de pacotes... Pronto
A construir árvore de dependências       
A ler a informação de estado... Pronto
A calcular a actualização... Pronto
0 pacotes actualizados, 0 pacotes novos instalados, 0 a remover e 0 não actualizados.
***@*******# 
------------------------

I have been looking for updates to move to SolydX10 but I do not receive these updates.

Is something escaping me?
ilu wrote:
29 Dec 2019 22:16
A sua saída java --version parece a SolydX9. Você deve atualizar para SolydX10.

Razões:
- Python modificações na versão 3.6 - você precisará de f-strings e aqueles vieram com python 3.6 na debian 10
(você pode trabalhar sem f-strings em python 3.5 mas é uma chatice porque estes cursos geralmente os requerem)
- Java modificações de 1.8 para 1.10 (Eu não uso Java por isso não sei detalhes)

------------------------
Your java --version output looks like SolydX9. You should update to SolydX10.

Reasons:
- Python changes in v 3.6 - you will need f-strings and those came with python 3.6 in debian 10
(you can work around f-strings with python 3.5 but it's a pain because these courses usually require them)
- Java changes from 1.8 to 1.10 (I don't do Java so I don't know details)

Translated with help from https://www.deepl.com/translator

Re: Install Java JDK and Set Environment Variables

Posted: 05 Jan 2020 09:35
by Arjen Balfoort
When SolydXK 10 was released last September, I also released an upgrade script for SolydXK 9 to SolydXK 10: https://downloads.solydxk.com/dev/solydxk10.sh

The topic for the script can be found here: viewtopic.php?f=5&t=7662

However, I recommend you to do a clean install because you must have experience with upgrading Debian systems. Also, the script has not been tested at all with the current SolydXK 9 systems. So, you must expect to solve problems arising from the upgrade.

Re: Install Java JDK and Set Environment Variables

Posted: 05 Jan 2020 21:05
by jsvenancio
Good evening.

I am going to do a new installation, but only in a week or two since in the next few days I must be traveling back to France.
Arjen Balfoort wrote:
05 Jan 2020 09:35
When SolydXK 10 was released last September, I also released an upgrade script for SolydXK 9 to SolydXK 10: https://downloads.solydxk.com/dev/solydxk10.sh

The topic for the script can be found here: viewtopic.php?f=5&t=7662

However, I recommend you to do a clean install because you must have experience with upgrading Debian systems. Also, the script has not been tested at all with the current SolydXK 9 systems. So, you must expect to solve problems arising from the upgrade.