Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Install Java 8 on Ubuntu using PPA     - X security settings in Ubuntu (Linux)

- JavaScript in this usage (Programming)

- Linux, C programming language library file handling and preparation of Makefile (Programming)

- PXE installation of Linux servers (Server)

- Linux compiler of GCC (Linux)

- 11 examples in Linux df command (Linux)

- Linux operating system boot process analysis (Linux)

- MyCAT easy entry (Database)

- Zabbix Agent for Linux Installation and Configuration (Server)

- CentOS 7 How to connect to a wireless network (Linux)

- Linux host dual LAN transceiver package ARP problem (Linux)

- Iptables principle (Linux)

- Dynamic programming Android (Programming)

- Ubuntu 14.04 install Sublime Text 3 plug and use SublimeClang (Linux)

- Open SSH remote access service that allows Android phone Ubuntu 14.04 (Linux)

- IP Security Policy is to learn how to prevent Ping and closed ports (Linux)

- Editor of the popular Linux Gvim (Linux)

- Oracle 11g manually create a database (Database)

- Network security system (Network)

- Go build the locale under Windows (Linux)

 
         
  Install Java 8 on Ubuntu using PPA
     
  Add Date : 2018-11-21      
         
         
         
  Although I am not a Java engineer, I never and did not intend to write Java, but still very concerned about this technology. Java 8 on the new features:

The interface has been completely static method can be defined. A common example is the java class library, for some interfaces, such as Foo, there will be a static method of the tool class to generate or Foo object instance to use. Static methods can exist in the interface, so in most cases Foos tool class can use the interface in the public method to proxy (or Foos into package-private).

In addition, the more important thing is, Java 8 interface can define the default method. For example, a for-each loop method can be added to the java.lang.Iterable:

Public default void forEach (Consumer < ? Super T> action) {
    Objects.requireNonNull (action); for (T t: this) {
        Action.accept (t);
    }}
}}

In the past, adding a method to a Java class library interface is basically impossible. Adding a method to an interface means breaking code that implements that interface, but now, as long as it provides a correct and sensible default method implementation, Java class library maintainers can add methods in the interface.

Java 8, a lot of the default method has been added to the core of the JDK interface.

The following is the focus of this article, the use of PPA in Ubuntu install Java 8 (support Ubuntu 10.04 - Ubuntu 14.04):

Sudo add-apt-repository ppa: webupd8team / java

Sudo apt-get update

Sudo apt-get install Oracle-java8-installer

When finished, you can view the version with the following command:

Javac -version

Installation of Java 8 requires a license, and if you want to install it automatically, you can run it before installing:

Echo oracle-java8-installer shared / accepted-oracle-license-v1-1 select true | sudo / usr / bin / debconf-set-selections

Setting the Java 8 environment variable:

Sudo apt-get install oracle-java8-set-default

Switch to Java 7:

Sudo update-java-alternatives -s java-7-oracle

And then switch to Java 8:

Sudo update-java-alternatives -s java-8-oracle
     
         
         
         
  More:      
 
- Python method to traverse folders and file read and write (Programming)
- Fedora 22 Server how to upgrade to Fedora 23 Beta Server (Linux)
- Use Ganglia to monitor your cluster (Server)
- Detailed driver compiled into the Linux kernel (Programming)
- Ubuntu PPA install SMPlayer 14.9 (Linux)
- To learn from scratch OpenWrt perfect tutorial (Linux)
- Oracle database physical file backup / restore (Database)
- Android custom slideshow menu slidmenu (Programming)
- SSH Filesystem use a secure connection for network file system (Linux)
- Zabbix API and PHP configuration (Server)
- Depth understanding of JavaScript new mechanism (Programming)
- Linux system with a firewall to prevent the DOS attack (Linux)
- Preview function to confirm the stop resource Oracle 12c new feature crsctl (Database)
- Linux server security settings to close unused ports (Linux)
- A key installation Gitlab 7 on RHEL6.4 and Setup Mail TX (Linux)
- Ansible module Know (Linux)
- Percona MySQL 5.6 semi-synchronous replication (Database)
- To create a problem by the statement date comparison of the difference between MySQL and Oracle (Database)
- SQLite database commonly used sentences and visualization tools on MAC MeasSQLlite use (Database)
- Experts teach you safety precautions Linux Sniffer (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.