Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are Java preferences stored on Mac OS X?

On Windows, the Java preferences, which you access in your application from java.util.prefs.Preferences are stored in the registry. Where are those stored on Mac OS X?

like image 936
avernet Avatar asked Mar 24 '09 01:03

avernet


People also ask

Where does Java Store preferences?

The user preferences are typically stored at user-home/. java/. userPrefs . The user preferences location can be overridden by setting the system property java.

Why Java is not showing in System Preferences Mac?

Mac OS X 10.7. 3 and above: Under System Preferences click on the Java icon to access the Java Control Panel which will list your Java version. If you do not see a Java icon under System Preferences, Java 7 or later versions is not installed.

Where is Java folder in Mac?

In macOS, the JDK installation path is /Library/Java/JavaVirtualMachines/jdk-10. jdk/Contents/Home . The root directory of the JDK software installation. This directory also contains copyright, README, and src.


2 Answers

From Apple Developer Connection:

The preferences files generated by the Preferences API are named com.apple.java.util.prefs. The user’s preferences file is stored in their home directory (~/Library/Preferences/). The system preferences are stored in /Library/Preferences/ and are only persisted to disk if the user is an administrator.

like image 87
Todd Gamblin Avatar answered Sep 22 '22 08:09

Todd Gamblin


Also, note that if the preference is nested enough, it won't directly be in com.apple.java.util.prefs, but rather in its own file. For instance, if you have a node /a/b/c, the key/value pairs for that node will be stored in a.b.c.plist.

The file will be either in ~/Library/Preferences/ or /Library/Preferences/, as for the com.apple.java.util.prefs file.

like image 31
avernet Avatar answered Sep 25 '22 08:09

avernet