2

I am new to java and I installed JDk 7 using

sudo apt-get install openjdk-7-jre

But when I do java -version I get this

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)

How do I set it to 1.7 and also how do I set my compiler to 1.7 in eclipse?

1 Answer 1

3

You may use the following command to change the default java version: sudo update-alternatives --config java

I think eclipse will use the default java version, but you may take a look at "Window -> Preferences -> Java -> Compiler"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .