Support for java.util.prefs.Preferences?
Steve McLeod
steve.mcleod at gmail.com
Wed Oct 5 05:45:54 PDT 2011
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