Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read OSX .plist files from Java?

Tags:

java

macos

plist

How to read OSX .plist files from Java?

like image 479
nonamelive Avatar asked Nov 17 '09 14:11

nonamelive


People also ask

How do I read Apple plist files?

plist - The primary property list for Mac OS X applications, located in the /​Contents/​ directory of an . APP bundle. To view this file, right-click an application file, select "Show Package Contents," and open the Contents folder.

How do I access plist files on Mac?

Open the plist file /Library/Preferences/com. apple. dock. plist in Xcode and use the editor to view and change values.

What is a plist file Mac?

Plist files are Mac files that allow you to save preferences in the apps you use. Occasionally they may need to be deleted to restore proper functionality to a program experiencing a conflict. You'll want to follow these steps when another article or situation calls for deleting your . plist file.


1 Answers

Imho running a commandline tool from Java is not quite the "best way to do the job".

There are several much better ways to deal with binary plist in JAVA: That one I prefere is an usefull little project by Daniel Dreibrodt at: google project hosting

You can also use Apache Commons Configuration (which API is supporting the Property List format). More information about the history of the .plist-format on OSX (which version introduced which format) I wrote up on my blog

Update: There is a new project hosted at source forge called Property List Library, that shall be able to read AND write .plist- I have not tested it, but it sounds interesting.

like image 104
Erik Avatar answered Oct 28 '22 02:10

Erik