If people google java to get the latest version of java they quickly find this site https://java.com/en/download/ which apparently links to a JRE (1.8, right?). Which isn't the latest JRE version, because that's JRE 10 right? Programmers generally want to use the latest version of JDK, too, which is currently JDK 10 right? So as far as I understand I explicitely have to ask people to go to Oracle and get the latest JRE version. Or does everyone know that already except me?
So I've been trying to install JDK 1.8 and "activate" it in Eclipse by going to preferences/java/compiler compliance level and changing it to 1.8 and also done the same from the project properties. I still get this message that JRE version 10 is currently the one active. And when I try to install the JRE version 8 I get the message that a newer version is already installed and my only option is "Ok". So can I /should I install two JRE versions?
Sorry, I'm a bit lost and I haven't been able to figure out how to find an answer because I'm not quite sure what question I should ask. I am already friends with Google.
When you go into Eclipse preferences and select Java Compiler, you have to be careful of: whether you've downloaded the actual version of Java and if you've set up a Java environment.
Start with this: Go to Preferences -> Java -> Installed JREs -> Execution Environments. There you will be able to associate a Java download (the actual jar files on your disk) to an Eclipse Execution Environment. The idea is when you select a compiler level, you don't directly choose a folder on your disk; you select an environment.
Now backup a level to Installed JREs. Here's when you actually find the folder with your Java installation. Press the Add button and select Standard VM and Next. In the JRE Definition window, press the Directory button and find your JDK installation. Select the top level folder. It usually looks like this on Windows: C:\Program Files\Java\jdk1.8.0_xxx, where xxx is the build number.
Now that you have a JRE definition, go back down to Execution Environments and associate your new Java version with an environment. Yes, it's confusing. Eclipse doesn't make it easy on you either.
Best of luck!
All things are lawful, but not all things are profitable.
When you are picking a JRE in Eclipse for development ,usually you want to apply the same one for all your projects (apply this to workspace) in settings . Use the JRE that is shipped with the JDK, in the JDK folder not the one that is JRE only.
End users download the JRE only .
You then set the compiler level in Properties . This is the level that the Web server or end user (for console application (Swing,Applets ) needs to run the application .
For console application (Swing,Applets ), end users will have to have thejr version of the JRE that is installed for that compiler level or higher.
If it is a web application, the JRE for end users doesn't matter unless you are using applets. What you want is to have the Web Server's jre match your compiler level .
For the most part, you don't have to prompt end users to install a specific JRE . A lot of people get prompts to update their java to a new version and just do it.
Hope this helps.
New rule: no elephants at the chess tournament. Tiny ads are still okay.