Support for java.util.prefs.Preferences?

Steve McLeod steve.mcleod at gmail.com
Wed Oct 5 06:40:13 PDT 2011


Done. Issue report is here: http://java.net/jira/browse/MACOSX_PORT-504

On 5 October 2011 15:17, Henri Gomez <henri.gomez at gmail.com> wrote:
> Same problem on my build package :
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no osx in
> java.library.path
>        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1872)
>        at java.lang.Runtime.loadLibrary0(Runtime.java:845)
>        at java.lang.System.loadLibrary(System.java:1084)
>        at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
>        at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.util.prefs.MacOSXPreferencesFile.<clinit>(MacOSXPreferencesFile.java:82)
>        at java.util.prefs.MacOSXPreferences.cfFileForNode(MacOSXPreferences.java:131)
>        at java.util.prefs.MacOSXPreferences.initFields(MacOSXPreferences.java:99)
>        at java.util.prefs.MacOSXPreferences.<init>(MacOSXPreferences.java:80)
>        at java.util.prefs.MacOSXPreferences.getUserRoot(MacOSXPreferences.java:56)
>        at java.util.prefs.MacOSXPreferencesFactory.userRoot(MacOSXPreferencesFactory.java:30)
>        at java.util.prefs.Preferences.userRoot(Preferences.java:457)
>        at java.util.prefs.Preferences.userNodeForPackage(Preferences.java:371)
>        at PreferencesTest.main(PreferencesTest.java:4)
>
> -> You should open a JIRA here : http://java.net/jira/browse/MACOSX_PORT
>
> 2011/10/5 Steve McLeod <steve.mcleod at gmail.com>:
>> Here's some sample code that reproduces the problem:
>>
>> package com.barbarysoftware.pokercopilot;
>> import java.util.prefs.Preferences;
>> public class ScratchSpace {
>>    public static void main(String[] args) throws InterruptedException {
>>        final Preferences preferences =
>> Preferences.userNodeForPackage(ScratchSpace.class);
>>        System.out.println("preferences = " + preferences);
>>    }
>> }
>>
>> Java 6 - code completes fully. Java 7 - exception thrown as per the
>> stack trace in the original message.
>>
>> On 5 October 2011 14:00, Steve McLeod <steve.mcleod at gmail.com> wrote:
>>> I tried running my app using yesterday's Java 7 Developer Preview
>>> Release. The app crashes on this line:
>>>
>>> return java.util.prefs.Preferences.userNodeForPackage(this.getClass());
>>>
>>> Here's the useful part of the stack trace:
>>>
>>> Exception in thread "main" java.lang.UnsatisfiedLinkError: no osx in
>>> java.library.path
>>>        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1872)
>>>        at java.lang.Runtime.loadLibrary0(Runtime.java:845)
>>>        at java.lang.System.loadLibrary(System.java:1084)
>>>        at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
>>>        at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>        at java.util.prefs.MacOSXPreferencesFile.<clinit>(MacOSXPreferencesFile.java:82)
>>>        at java.util.prefs.MacOSXPreferences.cfFileForNode(MacOSXPreferences.java:131)
>>>        at java.util.prefs.MacOSXPreferences.initFields(MacOSXPreferences.java:99)
>>>        at java.util.prefs.MacOSXPreferences.<init>(MacOSXPreferences.java:80)
>>>        at java.util.prefs.MacOSXPreferences.getUserRoot(MacOSXPreferences.java:56)
>>>        at java.util.prefs.MacOSXPreferencesFactory.userRoot(MacOSXPreferencesFactory.java:30)
>>>        at java.util.prefs.Preferences.userRoot(Preferences.java:457)
>>>        at java.util.prefs.Preferences.userNodeForPackage(Preferences.java:371)
>>>
>>> I hope this helpful in locating and fixing the problem.
>>>
>>> Regards,
>>>
>>> Steve
>>> ---------------------------------------------------
>>> Steve McLeod
>>> Founder, Poker Copilot
>>> http://www.pokercopilot.com
>>>
>>
>


More information about the macosx-port-dev mailing list