How to install Java 8 32bit on Linux Deepin x86_64

Asked

Viewed 807 times

1

sudo apt install oracle-java8

install java 64bits, someone knows how to force the installation of java 32bits?

  • sudo apt install oracle-java8:i386

  • http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html

  • E: Impossible to find oracle-java8:i368 package

1 answer

0


Download the java here;

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

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

On the command line, create a directory, if it does not exist and assign root to Owner, assign execution 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

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 you have/want to use:

update-alternatives --config java

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

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

[ux] at the end of the above command equals the final digits of version q vc installed.

Finally, test the installation:

java -version
  • But then x86_64 will not be installed?

  • Which you downloaded?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.