[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: about installing Java



> -----Original Message-----
> From: Klaus Jantzen [mailto:k.d.jantzen@t-online.de]
> Sent: Freitag, 13. Februar 2015 09:46
> To: debian-user@lists.debian.org
> Subject: Re: about installing Java
> 
> On 02/13/2015 01:54 AM, Jack Chuge wrote:
> > I want to install the latest version of Java on my debian desktop. Is
> > there any quick way like using a terminal command? Though, I think
> > debian is the most stable Linux distro I've ever used so far, on the
> > other hand, I'm a newby to it. Any support is appreciated.
> 
> Goto java.com, download the jdk1.8.xxxx.tar.gz for your computer
> architecture and unpack it to a suitable directory as described in the
> installation instructions in the download site (all takes you 5 min.).
> 
> I put my java into "/opt/jdk1.8.0_31".
> I use it e.g. to work with Eclipse.
> 
> --
> K.D.J.

Here is the way I do it:

1.  wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u55-b13/server-jre-7u55-linux-x64.tar.gz"; (replace the linked url!)

2.  tar xvfz name of the tarball -C /usr/lib/jvm/

3.  update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre*1.7.0_10/bin/java 1065

*replace with the correct version 
*number should be higher than any other - use update-alternatives --config java to check then check the installation with

4.  update-alternatives --config java

Should show something lik:
There are 4 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/jdk1.7.0_55/bin/java                1067      auto mode
  1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/jdk1.7.0_25/bin/java                1065      manual mode
  3            /usr/lib/jvm/jdk1.7.0_45/bin/java                1066      manual mode
  4            /usr/lib/jvm/jdk1.7.0_55/bin/java                1067      manual mode

5.  java -version

java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

(obviously, the version will vary depending on which one you install)

Cheers,

John

PS:  Who is General Failure, and why is he reading my C: Drive?



Reply to: