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 in Java by Sushmita
• 6,880 points
44 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 by Daisy
• 8,050 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,540 points
4,646 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,050 points
759 views
+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,380 points

edited Nov 6, 2018 by Omkar 8,188 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 in Java by Sirajul
• 25,700 points
133 views
0 votes
3 answers
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 parth295
• 4,620 points
401 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,320 points
1,795 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
51 views
+2 votes
10 answers

How to import a jar file in Eclipse?

Go to your project right click and ...READ MORE

answered Dec 10, 2018 in Java by Hola77
51,966 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,050 points
51 views