0

What exactly do I have to do to install JDK 11? In which directory do I have to install Java and what exactly have to be the value of JAVA_HOME (if necessary?)? I'm using Eclipse for programming and it forces me to install JDK in its subfolder "jre" (at all versions (WEB, PHP, Java, etc.)), so I did so, but shouldn't it actually work to just install JDK 11 normally, in the default directory (C:\Program Files\Java\jdk-11.0.1)?...

My OS ist Windows 10.

Before someone asks: Yes, I searched for an answer, but it didn't work (and/or I didn't understand completely)... (How to use jdk without jre in Java 11)

Naman
  • 27,789
  • 26
  • 218
  • 353
  • Can you please [edit] to add more details on what issues you were facing when you tried the solutions in that post? – gparyani Nov 07 '18 at 00:19

1 Answers1

0

The precise method will depend on your operating system e.g. Linux uses rpm/deb/snap while Windows uses exe/msi installers. If you want to manage multiple JDK versions and are on Mac OSX, Linux, Cygwin, Solaris and FreeBSD you can use SDKMan:

$ sdk install java
Downloading: java 11.0.1-open
In progress...
################################################################################################################# 100.0%
Repackaging Java 11.0.1-open...
Done repackaging...
Installing: java 11.0.1-open
Done installing!
Do you want java 11.0.1-open to be set as default? (Y/n): Y
Setting java 11.0.1-open as default.

$ java -version
java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

As part of the installation it will update PATH and JAVA_HOME to point to the selected Java version.

Karol Dowbecki
  • 43,645
  • 9
  • 78
  • 111