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

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
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 votes
3 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,400 points

edited Nov 6, 2018 by Omkar 16,641 views
0 votes
2 answers

How can I convert a String variable to a primitive int in Java

 Here are two ways illustrating this: Integer x ...READ MORE

answered Aug 20, 2019 in Java by Sirajul
• 50,310 points
+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
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,640 points
+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
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
+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
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