How to set JDK in Eclipse?

0 votes
I have JDK installed for Java 6 as well as for Java 7.

I am trying to build my project using both. How are these options added to the IDE? How would I get this to appear in the list? I have added two different JREs in my IDE preferences, but these are not what appears in the dropdown list.

How can we add JDK for both the versions on Eclipse?
Jan 3, 2019 in Java by Sushmita
• 6,890 points
5,932 views

1 answer to this question.

0 votes
To manage the list of compilers go to Window -> Preferences -> Java -> Installed JRE's tab

Go to project build path configuration -> libraries tab, you can delete the entry for "JRE System Library", click on "Add Library" and choose the installed JRE to compile with. Some compilers can be configured to compile at a back-level compiler version.
answered Jan 3, 2019 by Daisy
• 8,090 points

Related Questions In Java

0 votes
1 answer

How to set Encoding in Java ?

Unfortunately, the file.encoding property has to be specified as ...READ MORE

answered May 29, 2018 in Java by Rishabh
• 3,580 points
9,857 views
0 votes
1 answer

How to set margins in a LinearLayout programmatically?

LinearLayout ll = new LinearLayout(this); ll.setOrientation(LinearLayout.VERTICAL); LinearLayout.LayoutParams layoutParams = ...READ MORE

answered Dec 20, 2018 in Java by Daisy
• 8,090 points
5,421 views
0 votes
1 answer

How to set AUTO-SCROLLING of JTextArea in Java GUI?

Hii kartik, When you click anywhere over JTextArea, ...READ MORE

answered Apr 21 in Java by Niroj
• 44,420 points
73 views
0 votes
1 answer

How to set base url for rest in spring boot?

Hello @kartik, Set it up in your application.yml ...READ MORE

answered May 22 in Java by Niroj
• 44,420 points
784 views
+2 votes
3 answers

Selenium Webdriver + Java - Eclipse: java.lang.NoClassDefFoundError

I also faced this issue first time, ...READ MORE

answered Aug 28, 2019 in Selenium by Shraddha
19,733 views
0 votes
1 answer

How can we import javax.servlet API in Eclipse?

Before installing Eclipse, ensure that you are ...READ MORE

answered Jun 7, 2018 in Java by Parth
• 4,630 points
1,029 views
+28 votes
3 answers

How can we set java.library.path in Eclipse?

Go into the library settings for your ...READ MORE

answered Jul 3, 2018 in Java by sharth
• 3,370 points
5,026 views
0 votes
1 answer

Hadoop Documentation for Eclipse.

Few considerations to be taken are here: If ...READ MORE

answered Sep 11, 2018 in Big Data Hadoop by Frankie
• 9,810 points
199 views
+2 votes
10 answers

How to import a jar file in Eclipse?

To import jar file in your Eclipse ...READ MORE

answered May 15, 2018 in Java by sharth
• 3,370 points
150,859 views
0 votes
1 answer

How to set a timer in Java?

To work on timer in java, you ...READ MORE

answered May 16, 2018 in Java by Daisy
• 8,090 points
101 views