I would like to use the WatchService API as mentioned in this link: http://download.oracle.com/javase/tutorial/essential/io/notification.html
After reading around, I
Oracle has released JDK 7 for OS X.
It's possible that you still need to add the JDK into Eclipse (STS). Just because the JDK is on the system doesn't mean Eclipse knows where to find it.
Go to Preferences > Java > Installed JREs
If there is not an entry for the 1.7 JDK, add it. You'll have to point Eclipse to where you installed your 1.7 JDK.
If Eclipse can't find a JRE that is 1.7 compatible, I'm guessing that it just uses your default JRE, and that's probably still pointing at Java 1.6, which would be causing your red squiggly lines.
This is how I got 1.7 to work with Eclipse. I hope it helps.
that should be it :)
I updated to Yosemite and Android Studio wouldn't clean my projects or Run them on virtual or real device because of the following error:
Failed to complete Gradle execution.Cause:Supplied javaHome is not a valid folder. You supplied: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
After some research and trouble shooting, I found that the JDK file that was being pointed to at "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home" wasn't there; all of "JavaVirtualMachines/1.6.0.jdk/Contents/Home" was missing from "/System/Library/Java". So, I copied "JavaVirtualMachines/1.6.0.jdk/Contents/Home" over from "/Library/Java/" to "/System/Library/Java/" and cha ching! I was back in business.
Now, Use command
Update 2020: 04
To install Java7 with homebrew run:
brew tap homebrew/cask-versions
brew cask install java7
Hope this help.
How about Netbeans, here is an article how to set it up with NB7:
http://netbeanside61.blogspot.com/2011/06/downloading-openjdk7-binary-for-mac-os.html
Maybe similar steps for Eclipse.