Mac OS X 10.6.7 Java Path Current JDK confusing

前端 未结 5 1284
臣服心动
臣服心动 2020-11-29 02:05

I have trouble understanding (actual paths vs links) for multiple java versions on my Mac OSX. Normally in windows if I have multiple versions installed in my machine, I can

5条回答
  •  孤独总比滥情好
    2020-11-29 02:33

    From Apple Technical Q&A Java Questions:

    User Preferences

    On Mac OS X, the Java runtime provides the java.util.prefs API which is backed by the standard Mac OS X Preferences API and directories. Simply using this pure Java API reads and stores your application's preferences in ~/Library/Preferences in a Mac OS X property list file. For applications that may already have their own preferences format, these preferences should be stored in the ~/Library/Preferences directory as well. This directory can be reached from Java code by creating a file with the path of System.getProperty("user.home") + "/Library/Preferences/" + "com.example.your.Application". An application that should have global preferences across all users could instead reside in /Library/Preferences, however this directory is not writable by non-admin users.

提交回复
热议问题