pmeerw's blog

Nov 2018

Mon, 05 Nov 2018

Installing OpenJDK on Windows

This will probably be my only Windows and my only Java related blog post ever :(

The JDK version 11 is available from Oracle under a non-open-source license (which you probably don't want), and a GPLv2 license version, https://jdk.java.net/11/.

For Window, you get a .zip file, but no installer. The following has to be done manually:

  1. Unzip to some directory, e.g. C:\jdk-11.0.1
  2. Set PATH: Control Panel, System, Advanced, Environment Variables. Add C:\jdk-11.0.1\bin to PATH variable.
  3. Set JAVA_HOME under System Variables. Create new variable JAVA_HOME, set value to C:\jdk-11.0.1 (without \bin)
  4. Open RegEdit program. Create keys HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft, HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment. Create string value CurrentVersion and set it to the version to use, see below.
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft]
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment]
    "CurrentVersion"="11.0.1"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\11.0.1]
    "JavaHome"="C:\jdk-11.0.1"
    
  5. *facepalm*

posted at: 14:57 | path: /rant | permanent link

Made with PyBlosxom