How do I use JDK 7 on Mac OSX?

前端 未结 15 2256
滥情空心
滥情空心 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:24

    after installing the 1.7jdk from oracle, i changed my bash scripts to add:

    export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home
    

    and then running java -version showed the right version.

提交回复
热议问题