9

I recently uninstalled all Oracle Java products and installed OpenJDK from https://jdk.java.net/11/, on my Windows 10 system, because I'm planning to develop some Java applications. In order to install it I simply unzipped the jdk in another folder and set the JAVA_HOME environment variable accordingly. Then I've installed the Eclipse IDE and everything worked fine. However, I have another program (not developed by me) which stopped working complaining that it needs a Java Runtime Environment. I thought that the OpenJDK provides me all the tools to make Java applications run, but I'm surely missing something.

What have I tried: I read this thread from stackoverflow, but I don't want to build my own JRE, just have one on my computer capable of running the java applications I have already installed. (The fact that I can run the Java applications I'm creating and not external ones is a bit weird).

I've also tried to follow the guidance of this thread and that's the output of the two commands that the first answer advises to run:

C:\Users\MyUser>java --version
openjdk 11.0.2 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

C:\Users\MyUser>javac --version
javac 11.0.2

Thanks a lot in advance for your help.

8
  • What version of Java did you use when you compiled your application? What was the error when you ran your application? Instead of submitting a comment, edit your question, to include this vital information. To answer your question, yes, what you have downloaded is the Java runtime.
    – Ramhound
    Apr 1, 2019 at 9:53
  • This may help: stackoverflow.com/questions/32988601
    – Biswapriyo
    Apr 1, 2019 at 10:22
  • @Ramhound I am sorry if I was not clear enough when I wrote my question, but all the applications I develop run perfectly. It's just this application (I have not developed by myself: I have downloaded it from internet) that still asks for a JRE 1.8.0 when I try to run it.
    – LuxGiammi
    Apr 1, 2019 at 14:54
  • @Biswapriyo Thanks for the link, but I still don't understand why my applications work fine and the one I tried not developed by me (see comment above) complains about the missing JRE. Am I missing something in the installation procedure of the openJDK?
    – LuxGiammi
    Apr 1, 2019 at 15:00
  • Does JAVA_HOME environment variable has a valid path? Check it with echo %JAVA_HOME% command. If not set it.
    – Biswapriyo
    Apr 1, 2019 at 15:02

1 Answer 1

4

I think you have a couple different issues at play here.

  1. The best place to get OpenJDK and its related JRE is from the adoptopenjdk web site. On that site you can get a 64-bit Java 11 JRE available for Windows.
  2. The third party app you are trying to run and is complaining about Java 1.8.0 not being installed is likely poorly written. It is impossible to say without knowing exactly which app you are talking about, but my guess is that it is checking the Windows registry to see specifically whether Java 1.8.0 is installed. For some reason not known to me Oracle encodes release info into its Windows installer product key. This means any program specifically looking for (for example) Java 8u31 will not recognize an installation of Java 8u232.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.