How to fix: Files\Java\jdk-11.0.11"" was unexpected at this time

I’m currently following the java spring project and trying to run the first program locally.
Here is a link to the lessen: How Spring Works | Codecademy

I get the error: Files\Java\jdk-11.0.11"" was unexpected at this time.

Here is what I tried.

  • Updated the enviromental variables.
  • Double checked the java version is 11.
  • Checked if the spring application I use is java version 11.

I tried running the application from my eclipse IDE in the terminal and from the windows powershell. Same error accurs.

I appreciate all the help I can get.

This looks like a JAVA_HOME path issue. Eclipse may not like the path you’ve given it, for instance it may not like the space in between program and files in:

C:\User\Program Files.

To fix this you can use: C:\User\PROGRA~1\Java\jdk-11.0.11

Give that a try and see how you go.