harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu" <wuyue...@gmail.com>
Subject Re: [classlib][prefs] default provider of prefs
Date Tue, 30 Dec 2008 14:00:43 GMT
Hi Regis,

what if people want to set this property when launching java?  will it
be ignored if you do that in java code?

On Tue, Dec 30, 2008 at 6:25 PM, Regis <xu.regis@gmail.com> wrote:
> Hi,
>
> The provider of prefs is controlled by the property
> "java.util.prefs.PreferencesFactory" in Harmony, and we also have different
> default values for it on Linux and Windows, but the default values are set
> in luni module at modules/luni/src/main/native/luni/shared/luniglob.c,
> are there any special concerns that we must do it in luni native code? Or is
> it possible set it in prefs module with java code, like this:
>
>         if (factoryClassName == null) {
>             if (isWindows) {
>                 factoryClassName =
> "java.util.prefs.RegistryPreferencesFactoryImpl";
>             } else {
>                 factoryClassName =
> "java.util.prefs.FilePreferencesFactoryImpl";
>             }
>         }
>
> I think there must be a way to get current platform at runtime in java.
>
> --
> Best Regards,
> Regis.
>



-- 
Tony Wu
China Software Development Lab, IBM

Mime
View raw message