You need to add jdk 1.7
in the build path of your project in eclipse
. Follow below steps.
- Right click on
project
- Select
buil path
=>configure build path
- Select
Java Build Path
=> Library
- Click
Add Library
=>JRE System Library
=>Click next.
- Now select and add jdk1.7 installation location.
- Now click on
Java Compiler
=> select Java compiler to 1.7.
Note All version of eclipse does not include facet support for JDK 1.7 compiler
. I will recommend you to download Eclipse Juno
. Eclipse juno
has inbuilt facet support for jdk 1.7 compiler
.
Yeah - this is a huge f**g hairball, thanks mostly to Apple for their blockheaded resistance to supporting their users. There are some links that seem to allow one to manage their situation. I currently use Mavericks 10.9.4. Here's my take on the way to proceed:
DISCLAIMER: I am not expert on OSX, nor with Java, so follow these instructions with care. All I can say is that they semmed to work for me.
First, know that installing the latest version of Java (the JRE) gets the latest software on your system, but your system doesn't necessarily use it! To do that, you'll need to make use of the command line. Here's what I did:
First, I installed the latest version of Java, as downloaded from Oracle's Java website. To see if the new version was 'registered' in OSX, use the following command. This result shows that the 'system' doesn't recognize the upgrade, and won't be using it.
MacBook-1:~ jmoore$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
After some research, the solution seems to be the following:
MacBook-1:~ jmoore$ export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"
Now, let's check the version again to see if we've made any progress:
MacBook-1:~ jmoore$ java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
OK! I think that's it.
Best Answer
The easiest way to fix this is to add the Java bin dir to the beginning of your PATH instead of at the end.
Another option would be to delete
Windows\System32\java.exe
, so that the actual java.exe from the bin dir in your PATH is executed.