This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

How to enable toggling between 2 JDK in Eclipse?

 
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I am now trying out a hyperskill developer solution which uses var which means I have to use a higher version of JDK.

Thus, I installed openJDK 10 in Eclipse.  The Oracle one just could not be downloaded.


OS : Window 10

Now, the problem is that in the workspace, the rest of the codes are all written using Java 8 JDK from oracle.

How can I make Eclipse toggle between Java 8 JDK if I want the codes to run in Java 8 and this particular code which needs to run in OpenJDK 10 in Eclipse.

So, there was some errors occurred and I as usual hastily deleted the Java 8 compiler from build path.

And now I am ended up with this screen which I had no idea how to make things work.

https://i.imgur.com/HCi6nk7.png

Hope to get some tips here.

Tks.
 
tangara goh
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry guys, I managed to enable the IDE to run 2 versions inside.  Please help me to delete this post.
 
Saloon Keeper
Posts: 24587
168
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the frustrated people who wondered:

Eclipse allows you to register multiple JDKs and JREs within itself, assigning a label to each one for easy reference.

Eclipse projects can then be set up to reference by label so that one project might be set up for Java 8 and another for Java 11, for example.

This isn't the same thing as compatibility levels, where you tell the compiler and JVM which level of source and class compatibility you want - those are separate project options.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic