Showing posts with label jdk8. Show all posts
Showing posts with label jdk8. Show all posts

Tuesday, October 20, 2015

How To Install Oracle Java 8 In Debian Via Repository [JDK8]

Oracle Java 8 was released yesterday and it can be installed in Debian by using the failsdownloads Java PPA repository.

Usually, the packages available in Launchpad PPAs don't support Debian because they are built against specific Ubuntu libraries, but since the failsdownloads Oracle Java PPA contains just an installer, it works on Debian too.

Using this PPA repository, you'll be able to install Oracle Java 8 (which includes both JRE8 and JDK8) in Debian for both 32bit and 64bit as well as ARM (ARM v6/v7 Hard Float ABI - there's no JDK 8 ARM Soft Float ABI archive available for download on Oracle's website).

The installer automatically downloads and installs Oracle JDK8, but no actual Java files are available in our repository (that's not allowed by the Oracle Java license).

For Ubuntu / Linux Mint installation instructions, see: Install Oracle Java 8 In Ubuntu Via PPA Repository [JDK8]


Install Oracle Java 8 (both JDK8 and JRE8) in Debian


Oracle Java 8 installed Debian
Tested on Debian Wheezy but it should work with any Debian version

To add the failsdownloads Oracle Java PPA repository and install Oracle Java 8 in Debian, use the following commands:
su -
echo "deb http://ppa.launchpad.net/failsdownloadsteam/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/failsdownloadsteam-java.list
echo "deb-src http://ppa.launchpad.net/failsdownloadsteam/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/failsdownloadsteam-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit

And that's it, Oracle Java 8 should now be installed and you should get automatic updates for future Oracle Java 8 versions, under Debian.

Tip: if you're behind a firewall / router that blocks some of the redirects required to download the Oracle Java archive, you can download the JDK tar.gz archive manually and place it under /var/cache/oracle-jdk8-installer - then, installing the "oracle-java8-installer" package will use the local archive instead of trying it to download it itself.

You can check out the Java version on your system by using these commands:
java -version
This should display something like this:
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
Or:
javac -version
Which will display:
javac 1.8.0_31

For how to install Oracle Java 7 in Debian, see THIS article.


How to accept the Oracle JDK8 license automatically


The Oracle Java 8 installer requires you to accept the Oracle license before the installation begins. If for some reason you want to accept the license automatically, you can use the following command:
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections


How to set the Java environment variables


There is a package in our repository that automatically sets the Java 8 environment variables and sets JDK8 as the default JDK. To install it, use the following command:
sudo apt-get install oracle-java8-set-default
If you've already installed oracle-java6-set-default or oracle-java7-set-default, they will be automatically removed when installing oracle-java7-set-default (and the environment variables will be set for Oracle Java 8 instead).
Read more »

Monday, October 19, 2015

Oracle Java 8 (Stable) Released, Install it In Ubuntu

Oracle Java 8

Oracle has released Java 8 (stable) and the new version can already be installed by using the failsdownloads Java PPA.

Oracle Java 8 (JDK8) release highlights:
  • Lambda expressions, a new language feature, enables you to treat functionality as a method argument, or code as data;
  • Other significant enhancements and changes to the Java language and standard libraries have been added, including default methods, the new java.util.stream package, and the Date-Time API;
  • Compact Profiles contain predefined subsets of the Java SE platform and enable applications that do not require the entire Platform to be deployed and run on small devices;
  • Security enhancements include updates to the Java Cryptography Architecture; limited doPrivileged, a mechanism that enables code to assert a subset of its privileges; SSL/TLS Server Name Indication (SNI) Extension; and keystore enhancements;
  • JavaFX documentation has been updated for this release.
  • A new JavaScript engine, Nashorn, is included in JDK 8.
  • Java Mission Control 5.3 is included in JDK 8.

For more information, see the official release notes.

Download Oracle JDK 8 from HERE.

Ubuntu (and Linux Mint, etc.) can install the latest Oracle Java 8 by using our Java PPA. For more information and installation instructions, see: Install Oracle Java 8 In Ubuntu Via PPA Repository [JDK8]
Read more »