How to install java 8 32bits on Linux Deepin x86_64 [closed]

1
sudo apt install oracle-java8

installs java 64bits, does anyone know how to force java 32bits installation?

    
asked by anonymous 17.08.2017 / 14:47

1 answer

0

Download the java here ;

Double-click the package and put it in / tmp or    go to the shell and ...

$ tar xvzf ~/Downloads/jdk-8*.tar.gz -C /tmp/

At the command line, create a directory, if it does not exist and assign root as owner, assign execute permissions and move to /usr/lib/jvm/

$ sudo su
$ if [ ! -d "/usr/lib/jvm" ]; then mkdir /usr/lib/jvm; fi
$ chown -R root:root /tmp/jdk1.8*
$ chmod -R +x /tmp/jdk1.8*/bin
$ mv /tmp/jdk1.8* /usr/lib/jvm/

Install it

update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8*/bin/java 1065    

update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8*/bin/javac 1065

update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.8*/bin/jar 1065

update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.8*/bin/javaws 1065

Check or Set the version of java that you have / want to use:

update-alternatives --config java

Set the environment variable (optional) by editing the file $HOME/.bashrc by adding the line:

export JAVA_HOME=/usr/lib/jvm/jdk1.8[uX] 

[uX] at the end of the above command is equivalent to the final digits of the version you installed.

Finally, test the installation:

java -version
    
20.08.2017 / 00:34