• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Current vs older java JRE/JDK versions. Should I switch between them and how?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Screenshot-2018-08-07-19.02.29.jpg
[Thumbnail for Screenshot-2018-08-07-19.02.29.jpg]
Screenshot of message about active version og JDK
 
Bartender
Posts: 7436
66
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what "java.com" is. I believe the official site for Java downloads is
http://www.oracle.com/technetwork/java/javase/downloads/index.html

Current version is: 10.0.2

This requires Eclipse update to "Photon" version.
 
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I usually google jdk download and I find the Oracle site.  java.com seems a little suspicious.  
 
Knute Snortum
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 485
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
-Paul
 
New rule: no elephants at the chess tournament. Tiny ads are still okay.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic