5

This question is very similar to this question except the environment and the way I am getting this error. I also tried solution provided in the answer but no luck.

I am using Eclipse for developing a Spring Boot Application on Computer1. The JDK/JRE version on Computer1 and Eclipse is JDK 13.0.1.

JDK/JRE version

Now, I created a fat-JAR using eclipse mvn install and copied fat-JAR to Computer2. When I run the JAR file on Computer2 then I get the following error

enter image description here

On Computer2 I have JDK 13.0.1 installed and environment variable set. I removed the path "C:\Program Files (x86)\Common Files\Oracle\Java\javapath" from my Environment path as suggested by this similar question.

Any idea/suggestion how to resolve this issue.

Karan
  • 752
  • 2
  • 13
  • 34
  • Does this answer your question? [(class file version 53.0), Java Runtime versions up to 52.0 Visual studio code](https://stackoverflow.com/questions/47102120/class-file-version-53-0-java-runtime-versions-up-to-52-0-visual-studio-code) – seenukarthi Dec 02 '19 at 17:23
  • yeah well it says openjdk version 1.8 right there. Not sure how it's done on windows, but look into how to get path to the actual java.exe being called by cmd – Coderino Javarino Dec 02 '19 at 17:25
  • @KarthikeyanVaithilingam, no that doesn't as I have java SE 13. – Karan Dec 02 '19 at 17:31
  • @CoderinoJavarino, Yes I just saw that, I removed java before installing new Java SE 13. Now, trying to figure out to remove this openjdk as it is not showing on my control panel. – Karan Dec 02 '19 at 17:32

1 Answers1

0

The issue was that some applications come with their own JRE and sometimes the installed JDK appears at lower priority level in environment path. Now there are two options:

Uninstall the other application which has their own JDK/JRE. Sometimes it is not possible to remove the other application, which was my case. So I moved JDk installed by me to higher priority level in environment path.

The image for environment variable is uploaded at this similar question.

Karan
  • 752
  • 2
  • 13
  • 34