1. Information

There are two different implementations of Java, OpenJDK and Oracle Java, with almost no differences between them except that Oracle Java has a few additional commercial features. Oracle Java License permits only non-commercial use of the software, such as personal use and development use.

There are two different Java packages, Java Runtime Environment (JRE) and Java Development Kit (JDK). JRE includes the Java virtual machine (JVM), classes, and binaries that allow you to run Java programs. Java developers should install JDK, which includes JRE and development/debugging tools and libraries necessary to build Java applications.

2. Linux

2.1. JDK

2.1.1. Installation

  • Enter the following commands at a Command Line.

    sudo apt-get install default-jdk-headless
    # dpkg -l | grep -Eiw "java|jdk|jre"
    # java -version
    # which java

2.1.2. Uninstallation

  • Enter the following commands at a Command Line.

    dpkg -l | grep -Eiw "java|jdk|jre"
    sudo apt-get purge default-jre-headless
    sudo apt-get purge ca-certificates-java
    sudo apt-get purge java-common
    sudo apt-get autoremove
    sudo apt-get autoclean
    dpkg -l | grep -Eiw "java|jdk|jre"

2.2. JRE

2.2.1. Installation

  • Enter the following commands at a Command Line.

    sudo apt-get install default-jre-headless
    # dpkg -l | grep -Eiw "java|jdk|jre"
    # java -version
    # which java

2.2.2. Uninstallation

  • Enter the following commands at a Command Line.

    dpkg -l | grep -Eiw "java|jdk|jre"
    sudo apt-get purge default-jre-headless
    sudo apt-get purge ca-certificates-java
    sudo apt-get purge java-common
    sudo apt-get purge openjdk-11-jre-headless
    sudo apt-get autoremove
    sudo apt-get autoclean
    dpkg -l | grep -Eiw "java|jdk|jre"

3. Windows

3.1. JDK

3.1.1. Installation

3.2. JRE

3.2.1. Installation

For the 64-bit version a 64-bit browser is needed.
Thus for the moment just install the 32-bit version.

  • 32-bit: Run the jre-8u202-windows-i586.exe file with administrative privileges.

  • 64-bit: Run the jre-8u281-windows-x64.exe file with administrative privileges.

  • Uncheck Change destination folder.

  • Click Install.

  • Click Close.

3.2.2. Uninstallation

  • Log on as Administrator.

  • Open Control Panel > Programs and Features.

  • Uninstall any previous Java JRE installations.

  • Close Control Panel > Programs and Features.

3.2.3. Configuration

  • Log on as Administrator.

  • Open Control Panel > Java (32-bit).

  • Select the General tab.

  • Click Network Settings.

  • Choose Use browser settings.

  • Click OK.

  • Select the Update tab.

  • Select Notify Me: > Before downloading.

  • Uncheck Check for Updates Automatically.

  • Optional: Click Do Not Check to confirm.

    Notify Me:                              Before downloading
    □ Check for Updates Automatically
  • Optional: Select the Java tab.

  • Select the Security tab.

  • Choose Very High.

    ■ Enable Java content in the browser
    
    Security level:                 Very High
  • Select the Advanced tab.

  • Click Apply.

  • Click OK.

  • Close Control Panel > Java (32-bit).

3.2.4. Disable updates

  • Log on as Administrator.

  • Start Registry Editor.

  • [opt] 32-bit Select HKLM\Software\JavaSoft\Java Update\Policy.

  • [opt] 64-bit Select HKLM\Software\Wow6432Node\JavaSoft\Java Update\Policy.

  • Double-click EnableJavaUpdate.

  • Type 0 and select OK.

  • Close Registry Editor.

  • Start CCleaner.

  • Select the Tools page.

  • Select the Startup tab.

  • Disable SunJavaUpdateSched.

  • Close CCleaner.