0

I'm trying to get back into java development and at the moment I'm using the same setup I used a few years back - lets say 2015. It's been a while since I've done all this so everything needed updating...

I've installed the latest JDK from the Java website but when I run my code the console tells me I'm still using version 8 - what steps should I take to be updated?

What I've done already: - in Windows > Preferences > Java > Installed JREs - I've added my new JDK - in Windows > Preferences > Java > Installed JREs > Execution Environment - I've selected JavaSE13 with compatible JRE jdk14

shahid22
  • 1
  • 3
  • I don't know if you realize, but you can set JDK version on a project-by-project and workspace-by-workspace basis. It's not enough just to show Eclipse where your new JDK is. – MarsAtomic Apr 22 '20 at 21:24
  • Great! I didn't notice that - thank you for the reply :) – shahid22 Apr 22 '20 at 21:28

1 Answers1

0

Assuming you are not using Maven/gradle, you need to update your project or workspace settings.

Workspace:

  1. Open menu Window > Preferences;
  2. Select Java > Compiler;
  3. Adjust your compiler compliance level accordingly.

Project:

  1. Open context menu over your project;
  2. Select 'Properties';
  3. Select 'Java Compiler';
  4. Adjust your compiler compliance level accordingly.
Claudio Weiler
  • 589
  • 2
  • 15
  • Thank you Claudio. I did that and created a new project selecting the latest jdk version. I think that is everything updated now :) – shahid22 Apr 22 '20 at 21:39