http://openjdk.java.net/
ubuntu 16.04 Java JDK 包含两个版本,一个开源版本 OpenJDK,另一个版本 Oracle JDK。
1.1 sudo apt-get update
foreverstrong@strong:~$ sudo apt-get update
[sudo] password for foreverstrong:
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Hit:2 http://cn.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [67.7 kB]
Get:5 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:6 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [319 kB]
Get:7 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [232 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [72.2 kB]
Get:9 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [247 kB]
Get:10 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [333 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [108 kB]
Get:12 http://cn.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [5,968 B]
Get:13 http://cn.archive.ubuntu.com/ubuntu xenial-updates/multiverse DEP-11 64x64 Icons [14.3 kB]
Get:14 http://cn.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3,328 B]
Get:15 http://cn.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [5,104 B]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [145 kB]
Fetched 1,875 kB in 19s (98.6 kB/s)
Reading package lists... Done
foreverstrong@strong:~$
1.2 java -version
java -version 判断是否安装 jdk,或者 Ubuntu 自带的 jdk 包。
foreverstrong@strong:~$ java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-5-jre-headless
* openjdk-8-jre-headless
* gcj-4.8-jre-headless
* gcj-4.9-jre-headless
* openjdk-9-jre-headless
Try: sudo apt install <selected package>
foreverstrong@strong:~$
1.3 sudo apt-get install openjdk-8-jdk
foreverstrong@strong:~$ sudo apt-get install openjdk-8-jdk
[sudo] password for foreverstrong:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
snap-confine
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
ca-certificates-java fonts-dejavu-extra java-common libgif7 libxt-dev openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless
Suggested packages:
default-jre libxt-doc openjdk-8-demo openjdk-8-source visualvm icedtea-8-plugin fonts-ipafont-gothic fonts-ipafont-mincho
fonts-wqy-microhei fonts-wqy-zenhei fonts-indic
The following NEW packages will be installed:
ca-certificates-java fonts-dejavu-extra java-common libgif7 libxt-dev openjdk-8-jdk openjdk-8-jdk-headless openjdk-8-jre
openjdk-8-jre-headless
0 upgraded, 9 newly installed, 0 to remove and 66 not upgraded.
Need to get 37.9 MB of archives.
After this operation, 148 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 java-common all 0.56ubuntu2 [7,742 B]
Get:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openjdk-8-jre-headless amd64 8u181-b13-1ubuntu0.16.04.1 [27.0 MB]
Get:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 ca-certificates-java all 20160321ubuntu1 [12.5 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 fonts-dejavu-extra all 2.35-1 [1,749 kB]
Get:5 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgif7 amd64 5.1.4-0.3~16.04 [30.5 kB]
Get:6 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libxt-dev amd64 1:1.1.5-0ubuntu1 [394 kB]
Get:7 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openjdk-8-jre amd64 8u181-b13-1ubuntu0.16.04.1 [69.5 kB]
Get:8 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openjdk-8-jdk-headless amd64 8u181-b13-1ubuntu0.16.04.1 [8,202 kB]
Get:9 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openjdk-8-jdk amd64 8u181-b13-1ubuntu0.16.04.1 [450 kB]
Fetched 37.9 MB in 2min 43s (232 kB/s)
Selecting previously unselected package java-common.
(Reading database ... 203062 files and directories currently installed.)
Preparing to unpack .../java-common_0.56ubuntu2_all.deb ...
Unpacking java-common (0.56ubuntu2) ...
Selecting previously unselected package openjdk-8-jre-headless:amd64.
Preparing to unpack .../openjdk-8-jre-headless_8u181-b13-1ubuntu0.16.04.1_amd64.deb ...
Unpacking openjdk-8-jre-headless:amd64 (8u181-b13-1ubuntu0.16.04.1) ...
Selecting previously unselected package ca-certificates-java.
Preparing to unpack .../ca-certificates-java_20160321ubuntu1_all.deb ...
Unpacking ca-certificates-java (20160321ubuntu1) ...
Selecting previously unselected package fonts-dejavu-extra.
Preparing to unpack .../fonts-dejavu-extra_2.35-1_all.deb ...
Unpacking fonts-dejavu-extra (2.35-1) ...
Selecting previously unselected package libgif7:amd64.
Preparing to unpack .../libgif7_5.1.4-0.3~16.04_amd64.deb ...
Unpacking libgif7:amd64 (5.1.4-0.3~16.04) ...
Selecting previously unselected package libxt-dev:amd64.
Preparing to unpack .../libxt-dev_1%3a1.1.5-0ubuntu1_amd64.deb ...
Unpacking libxt-dev:amd64 (1:1.1.5-0ubuntu1) ...
Selecting previously unselected package openjdk-8-jre:amd64.
Preparing to unpack .../openjdk-8-jre_8u181-b13-1ubuntu0.16.04.1_amd64.deb ...
Unpacking openjdk-8-jre:amd64 (8u181-b13-1ubuntu0.16.04.1) ...
Selecting previously unselected package openjdk-8-jdk-headless:amd64.
Preparing to unpack .../openjdk-8-jdk-headless_8u181-b13-1ubuntu0.16.04.1_amd64.deb ...
Unpacking openjdk-8-jdk-headless:amd64 (8u181-b13-1ubuntu0.16.04.1) ...
Selecting previously unselected package openjdk-8-jdk:amd64.
Preparing to unpack .../openjdk-8-jdk_8u181-b13-1ubuntu0.16.04.1_amd64.deb ...
Unpacking openjdk-8-jdk:amd64 (8u181-b13-1ubuntu0.16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ca-certificates (20170717~16.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Processing triggers for fontconfig (2.11.94-0ubuntu1.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up java-common (0.56ubuntu2) ...
Setting up fonts-dejavu-extra (2.35-1) ...
Setting up libgif7:amd64 (5.1.4-0.3~16.04) ...
Setting up libxt-dev:amd64 (1:1.1.5-0ubuntu1) ...
Setting up openjdk-8-jre-headless:amd64 (8u181-b13-1ubuntu0.16.04.1) ...
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/jjs to provide /usr/bin/jjs (jjs) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/orbd to provide /usr/bin/orbd (orbd) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/servertool to provide /usr/bin/servertool (servertool) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/tnameserv to provide /usr/bin/tnameserv (tnameserv) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode
Setting up ca-certificates-java (20160321ubuntu1) ...
Adding debian:QuoVadis_Root_CA_2.pem
Adding debian:Staat_der_Nederlanden_Root_CA_-_G3.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_ECC_RootCA_2015.pem
Adding debian:AddTrust_Low-Value_Services_Root.pem
Adding debian:SecureSign_RootCA11.pem
Adding debian:Staat_der_Nederlanden_EV_Root_CA.pem
Adding debian:AffirmTrust_Networking.pem
Adding debian:Camerfirma_Global_Chambersign_Root.pem
Adding debian:SZAFIR_ROOT_CA2.pem
Adding debian:QuoVadis_Root_CA.pem
Adding debian:DigiCert_Global_Root_CA.pem
Adding debian:T-TeleSec_GlobalRoot_Class_3.pem
Adding debian:AddTrust_Qualified_Certificates_Root.pem
Adding debian:QuoVadis_Root_CA_1_G3.pem
Adding debian:UTN_USERFirst_Hardware_Root_CA.pem
Adding debian:COMODO_Certification_Authority.pem
Adding debian:ssl-cert-snakeoil.pem
Adding debian:Microsec_e-Szigno_Root_CA_2009.pem
Adding debian:Verisign_Class_3_Public_Primary_Certification_Authority_-_G3.pem
Adding debian:Entrust_Root_Certification_Authority.pem
Adding debian:DigiCert_Trusted_Root_G4.pem
Adding debian:USERTrust_RSA_Certification_Authority.pem
Adding debian:Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem
Adding debian:CNNIC_ROOT.pem
Adding debian:ISRG_Root_X1.pem
Adding debian:GeoTrust_Universal_CA.pem
Adding debian:GlobalSign_Root_CA_-_R3.pem
Adding debian:GeoTrust_Global_CA.pem
Adding debian:Taiwan_GRCA.pem
Adding debian:Sonera_Class_2_Root_CA.pem
Adding debian:DigiCert_Assured_ID_Root_G2.pem
Adding debian:Security_Communication_EV_RootCA1.pem
Adding debian:Buypass_Class_3_Root_CA.pem
Adding debian:EC-ACC.pem
Adding debian:Starfield_Class_2_CA.pem
Adding debian:Visa_eCommerce_Root.pem
Adding debian:Camerfirma_Chambers_of_Commerce_Root.pem
Adding debian:CA_Disig_Root_R1.pem
Adding debian:IdenTrust_Public_Sector_Root_CA_1.pem
Adding debian:Certum_Trusted_Network_CA.pem
Adding debian:VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem
Adding debian:OpenTrust_Root_CA_G1.pem
Adding debian:thawte_Primary_Root_CA_-_G2.pem
Adding debian:GlobalSign_Root_CA.pem
Adding debian:Izenpe.com.pem
Adding debian:Certigna.pem
Adding debian:T-TeleSec_GlobalRoot_Class_2.pem
Adding debian:AffirmTrust_Premium.pem
Adding debian:TWCA_Global_Root_CA.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_2009.pem
Adding debian:DigiCert_Global_Root_G2.pem
Adding debian:SecureTrust_CA.pem
Adding debian:Amazon_Root_CA_1.pem
Adding debian:OISTE_WISeKey_Global_Root_GB_CA.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2015.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2011.pem
Adding debian:AddTrust_External_Root.pem
Adding debian:GeoTrust_Universal_CA_2.pem
Adding debian:DST_Root_CA_X3.pem
Adding debian:OpenTrust_Root_CA_G2.pem
Adding debian:Certinomis_-_Root_CA.pem
Adding debian:CFCA_EV_ROOT.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R4.pem
Adding debian:Comodo_Secure_Services_root.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_EV_2009.pem
Adding debian:TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H5.pem
Adding debian:Buypass_Class_2_Root_CA.pem
Adding debian:COMODO_RSA_Certification_Authority.pem
Adding debian:PSCProcert.pem
Adding debian:ACCVRAIZ1.pem
Adding debian:Go_Daddy_Root_Certificate_Authority_-_G2.pem
Adding debian:Security_Communication_Root_CA.pem
Adding debian:AffirmTrust_Premium_ECC.pem
Adding debian:Certum_Root_CA.pem
Adding debian:Swisscom_Root_CA_1.pem
Adding debian:ePKI_Root_Certification_Authority.pem
Adding debian:DigiCert_Global_Root_G3.pem
Adding debian:Certinomis_-_Autorité_Racine.pem
Adding debian:GeoTrust_Primary_Certification_Authority_-_G3.pem
Adding debian:Go_Daddy_Class_2_CA.pem
Adding debian:Trustis_FPS_Root_CA.pem
Adding debian:Security_Communication_RootCA2.pem
Adding debian:Cybertrust_Global_Root.pem
Adding debian:IdenTrust_Commercial_Root_CA_1.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R5.pem
Adding debian:AffirmTrust_Commercial.pem
Adding debian:OISTE_WISeKey_Global_Root_GA_CA.pem
Adding debian:Actalis_Authentication_Root_CA.pem
Adding debian:Amazon_Root_CA_3.pem
Adding debian:Baltimore_CyberTrust_Root.pem
Adding debian:LuxTrust_Global_Root_2.pem
Adding debian:Certum_Trusted_Network_CA_2.pem
Adding debian:ACEDICOM_Root.pem
Adding debian:Entrust.net_Premium_2048_Secure_Server_CA.pem
Adding debian:EE_Certification_Centre_Root_CA.pem
Adding debian:AddTrust_Public_Services_Root.pem
Adding debian:XRamp_Global_CA_Root.pem
Adding debian:AC_RAIZ_FNMT-RCM.pem
Adding debian:thawte_Primary_Root_CA.pem
Adding debian:thawte_Primary_Root_CA_-_G3.pem
Adding debian:TURKTRUST_Certificate_Services_Provider_Root_2007.pem
Adding debian:Amazon_Root_CA_2.pem
Adding debian:Staat_der_Nederlanden_Root_CA_-_G2.pem
Adding debian:Comodo_AAA_Services_root.pem
Adding debian:Comodo_Trusted_Services_root.pem
Adding debian:Deutsche_Telekom_Root_CA_2.pem
Adding debian:SwissSign_Silver_CA_-_G2.pem
Adding debian:Hongkong_Post_Root_CA_1.pem
Adding debian:TUBITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.pem
Adding debian:Entrust_Root_Certification_Authority_-_EC1.pem
Adding debian:QuoVadis_Root_CA_2_G3.pem
Adding debian:COMODO_ECC_Certification_Authority.pem
Adding debian:Certplus_Root_CA_G1.pem
Adding debian:Atos_TrustedRoot_2011.pem
Adding debian:Secure_Global_CA.pem
Adding debian:DigiCert_Assured_ID_Root_G3.pem
Adding debian:Swisscom_Root_CA_2.pem
Adding debian:Chambers_of_Commerce_Root_-_2008.pem
Adding debian:E-Tugra_Certification_Authority.pem
Adding debian:CA_Disig_Root_R2.pem
Adding debian:Starfield_Root_Certificate_Authority_-_G2.pem
Adding debian:VeriSign_Universal_Root_Certification_Authority.pem
Adding debian:GeoTrust_Global_CA_2.pem
Adding debian:VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem
Adding debian:Global_Chambersign_Root_-_2008.pem
Adding debian:Swisscom_Root_EV_CA_2.pem
Adding debian:NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem
Adding debian:GeoTrust_Primary_Certification_Authority_-_G2.pem
Adding debian:OpenTrust_Root_CA_G3.pem
Adding debian:DST_ACES_CA_X6.pem
Adding debian:QuoVadis_Root_CA_3.pem
Adding debian:TWCA_Root_Certification_Authority.pem
Adding debian:SwissSign_Gold_CA_-_G2.pem
Adding debian:DigiCert_High_Assurance_EV_Root_CA.pem
Adding debian:Certplus_Class_2_Primary_CA.pem
Adding debian:Entrust_Root_Certification_Authority_-_G2.pem
Adding debian:TÜBİTAK_UEKAE_Kök_Sertifika_Hizmet_Sağlayıcısı_-_Sürüm_3.pem
Adding debian:Starfield_Services_Root_Certificate_Authority_-_G2.pem
Adding debian:GeoTrust_Primary_Certification_Authority.pem
Adding debian:GlobalSign_Root_CA_-_R2.pem
Adding debian:Certplus_Root_CA_G2.pem
Adding debian:certSIGN_ROOT_CA.pem
Adding debian:DigiCert_Assured_ID_Root_CA.pem
Adding debian:Network_Solutions_Certificate_Authority.pem
Adding debian:Amazon_Root_CA_4.pem
Adding debian:China_Internet_Network_Information_Center_EV_Certificates_Root.pem
Adding debian:TeliaSonera_Root_CA_v1.pem
Adding debian:QuoVadis_Root_CA_3_G3.pem
Adding debian:USERTrust_ECC_Certification_Authority.pem
done.
Setting up openjdk-8-jre:amd64 (8u181-b13-1ubuntu0.16.04.1) ...
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/policytool to provide /usr/bin/policytool (policytool) in auto mode
Setting up openjdk-8-jdk-headless:amd64 (8u181-b13-1ubuntu0.16.04.1) ...
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/idlj to provide /usr/bin/idlj (idlj) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jdeps to provide /usr/bin/jdeps (jdeps) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/wsimport to provide /usr/bin/wsimport (wsimport) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jinfo to provide /usr/bin/jinfo (jinfo) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jsadebugd to provide /usr/bin/jsadebugd (jsadebugd) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/native2ascii to provide /usr/bin/native2ascii (native2ascii) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jstat to provide /usr/bin/jstat (jstat) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/javac to provide /usr/bin/javac (javac) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/javah to provide /usr/bin/javah (javah) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jps to provide /usr/bin/jps (jps) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jstack to provide /usr/bin/jstack (jstack) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jrunscript to provide /usr/bin/jrunscript (jrunscript) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/javadoc to provide /usr/bin/javadoc (javadoc) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jhat to provide /usr/bin/jhat (jhat) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/javap to provide /usr/bin/javap (javap) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jar to provide /usr/bin/jar (jar) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/xjc to provide /usr/bin/xjc (xjc) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/schemagen to provide /usr/bin/schemagen (schemagen) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/extcheck to provide /usr/bin/extcheck (extcheck) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/rmic to provide /usr/bin/rmic (rmic) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jstatd to provide /usr/bin/jstatd (jstatd) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jmap to provide /usr/bin/jmap (jmap) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jdb to provide /usr/bin/jdb (jdb) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/serialver to provide /usr/bin/serialver (serialver) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/wsgen to provide /usr/bin/wsgen (wsgen) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jcmd to provide /usr/bin/jcmd (jcmd) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jarsigner to provide /usr/bin/jarsigner (jarsigner) in auto mode
Setting up openjdk-8-jdk:amd64 (8u181-b13-1ubuntu0.16.04.1) ...
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/appletviewer to provide /usr/bin/appletviewer (appletviewer) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jconsole to provide /usr/bin/jconsole (jconsole) in auto mode
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for ca-certificates (20170717~16.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
done.
foreverstrong@strong:~$
foreverstrong@strong:~$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1ubuntu0.16.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
foreverstrong@strong:~$
http://openjdk.java.net/
The place to collaborate on an open-source implementation of the Java Platform, Standard Edition, and related projects.
https://www.oracle.com/technetwork/java/javase/overview/index.html
collaborate [kə'læbəreɪt]:vi. 合作,勾结,通敌
http://openjdk.java.net/install/index.html
Oracle’s OpenJDK JDK binaries for Windows, macOS, and Linux are available on release-specific pages of jdk.java.net as .tar.gz or .zip archives.
http://jdk.java.net/
As an example, the archives for JDK 11 may be found on jdk.java.net/11 and may be extracted on the command line using
http://jdk.java.net/11/
$ tar xvf openjdk-11*_bin.tar.gz
or
$ unzip openjdk-11*_bin.zip
depending on the archive type.
Debian, Ubuntu, etc.
On the command line, type:
$ sudo apt-get install openjdk-8-jre
The openjdk-8-jre
package contains just the Java Runtime Environment. If you want to develop Java programs then please install the openjdk-8-jdk
package.
Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.
On the command line, type:
$ su -c "yum install java-1.8.0-openjdk"
The java-1.8.0-openjdk
package contains just the Java Runtime Environment. If you want to develop Java programs then install the java-1.8.0-openjdk-devel
package.
Debian, Ubuntu, etc.
On the command line, type:
$ sudo apt-get install openjdk-7-jre
The openjdk-7-jre
package contains just the Java Runtime Environment. If you want to develop Java programs then install the openjdk-7-jdk
package.
Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.
On the command line, type:
$ su -c "yum install java-1.7.0-openjdk"
The java-1.7.0-openjdk
package contains just the Java Runtime Environment. If you want to develop Java programs then install the java-1.7.0-openjdk-devel
package.
Debian, Ubuntu, etc.
On the command line, type:
$ sudo apt-get install openjdk-6-jre
The openjdk-6-jre
package contains just the Java Runtime Environment. If you want to develop Java programs then install the openjdk-6-jdk
package.
Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.
On the command line, type:
$ su -c "yum install java-1.6.0-openjdk"
The java-1.6.0-openjdk
package contains just the Java Runtime Environment. If you want to develop Java programs then install the java-1.6.0-openjdk-devel
package.
For a list of pointers to packages of the BSD Port for DragonFly BSD, FreeBSD, Mac OS X, NetBSD and OpenBSD, please see the BSD porting Project’s wiki page.
http://openjdk.java.net/projects/bsd-port/