tags:

views:

132

answers:

2
+5  A: 

You can specify the exact jvm you want to use through:

Once started, you can reference as many JVM you need in the Installed JRE preference panel

alt text

Finally, you need to reference the JVM you need in the Libraries tab, in your Java Build Path properties of your Java project (as mentioned by Steve in his answer):

alt text

VonC
I followed your answer but the problem is still a problem. So I have attached a screenshot showing redline under import statements.
Yatendra Goel
Now the problem is solved. I forgot to add the jre-library to the project buildpath.
Yatendra Goel
@Yatendra: good point. I have updated the answer to illustrate that last setting.
VonC
+4  A: 

It seems, that your project doesn't have the JVM in it's Build Path.

Right-Click on your project. Choose Build Path --> Add Libraries.... Take JRE System Library and choose a JVM for your project.

Steve
+1 yes, that was the problem. thanks
Yatendra Goel