How do I use JDK 7 on Mac OSX?

前端 未结 15 2260
滥情空心
滥情空心 2020-11-29 17:13

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

15条回答
  •  甜味超标
    2020-11-29 17:45

    This is how I got 1.7 to work with Eclipse. I hope it helps.

    1. I Downloaded the latest OpenJDK 1.7 universal (32/64 bits) JDK from Mac OS/X branch from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
    2. copied the jdk to /Library/Java/JavaVirtualMachines/ next to the default 1.6.0 one
    3. In Eclipse > Preferences > Java > Installed JREs you add a new one, of type MacOS X VM, and set the home as /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home and name Java SE 7 (OpenJDK)
    4. Click Finish
    5. Set the added JRE as default

    that should be it :)

提交回复
热议问题