0

I have installed JDK 13.2. However, I cannot find a JRE in that version. I have tried to install the OpenJDK version of 13.2 as well. but still. I get the below, when i do Java - version. java version "1.8.0_241" Java(TM) SE Runtime Environment (build 1.8.0_241-b07) Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)

also When i do Javac -version. i get 1.8.0.241

Because of this old version some of the latest functions are not working, for instance, i have to use Array.listAs instead of List.of

I tired to remove and re add the whole thing from Environment variable, but to no avail.

any thoughts pls?

Rajesh
  • 43
  • 1
  • 6
  • 2
    In Eclipse you have to configure the JDK in _Window > Preferences: Java > Installed JREs_ to be able to use it. – howlger Mar 14 '20 at 15:45
  • 2
    In recent versions of Java there is no longer a separate JRE, just the JDK. – greg-449 Mar 14 '20 at 15:46
  • Depending on how it was installed, you might need to add the JDK 13 `bin` folder to the beginning of the PATH yourself. – Andreas Mar 14 '20 at 17:01

1 Answers1

0

Check the list of entries in the PATH environment variable. Java 8 may be the first item in the list. You need to remove it, or move it down. After that, you need to close the command-line and open a new one. If you reuse an open command-line, you won't get the change.

geffchang
  • 3,279
  • 2
  • 32
  • 58