java.util.prefs.Preferences

Discussion in 'Java' started by Oliver Hirschi, Jul 16, 2003.

  1. Hi

    I have just now read from the java API "java.util.prefs.Preferences".
    Does anyone know where the preferences are stored?
    I have read, they should be still available after a shutdown and restart
    of the application.
    What is with the preferences after a restart of the system?

    Thanx.

    --
    Oliver Hirschi
    http://www.FamilyHirschi.ch
     
    Oliver Hirschi, Jul 16, 2003
    #1
    1. Advertising

  2. Oliver Hirschi

    Jon A. Cruz Guest

    Oliver Hirschi wrote:
    > Hi
    >
    > I have just now read from the java API "java.util.prefs.Preferences".
    > Does anyone know where the preferences are stored?
    > I have read, they should be still available after a shutdown and restart
    > of the application.
    > What is with the preferences after a restart of the system?
    >
    > Thanx.
    >


    I think that on Windows they are stored in the registry, and under Linux
    they are store in a hierarchy of nestled hidden directories in the
    user's home directory.

    ~/.java/.userPrefs/... on my box at the moment.
     
    Jon A. Cruz, Jul 16, 2003
    #2
    1. Advertising

  3. Oliver Hirschi

    Armel HERVE Guest

    In article <>, says...

    > I think that on Windows they are stored in the registry, and under Linux
    > they are store in a hierarchy of nestled hidden directories in the
    > user's home directory.
    >
    > ~/.java/.userPrefs/... on my box at the moment.
    >
    >

    Is it possible to use it with non signed applet ?
     
    Armel HERVE, Jul 16, 2003
    #3
  4. "Oliver Hirschi" <> writes:
    > I have just now read from the java API "java.util.prefs.Preferences".
    > Does anyone know where the preferences are stored?


    This depends on the operating system. E.g. on Windows the registry is
    used. On Solaris it is a file under /etc.

    /Thomas
     
    Thomas Weidenfeller, Jul 16, 2003
    #4
  5. Oliver Hirschi

    Andy Flowers Guest

    You don't need to know where they are stored, only that they are persistent.
    The API offers the contract that each JVM on each platform implements as it
    sees fit, all it has to do is honour the contract.

    However, in Windows I believe they are stored in the registry, and in
    Unix/Linux I guess there would be textual properties files.

    "Oliver Hirschi" <> wrote in message
    news:bf2qjl$af491$-berlin.de...
    > Hi
    >
    > I have just now read from the java API "java.util.prefs.Preferences".
    > Does anyone know where the preferences are stored?
    > I have read, they should be still available after a shutdown and restart
    > of the application.
    > What is with the preferences after a restart of the system?
    >
    > Thanx.
    >
    > --
    > Oliver Hirschi
    > http://www.FamilyHirschi.ch
    >
    >
     
    Andy Flowers, Jul 16, 2003
    #5
  6. "Andy Flowers" <> schrieb im
    Newsbeitrag news:ca7Ra.12402$...
    > You don't need to know where they are stored, only that they are

    persistent.
    > The API offers the contract that each JVM on each platform implements

    as it
    > sees fit, all it has to do is honour the contract.


    What about different JVMs. Do they use the same Preferences?
     
    Oliver Hirschi, Jul 16, 2003
    #6
  7. Oliver Hirschi

    Andy Flowers Guest

    Not sure I understand the question but here's a stab at an answer.

    EVERY jvm that implements the Preferences API will support the sames API
    calls. How they are implemented is up to the JVM. The Preferences class is
    the same in every JVM, it uses a JVM/OS specific class that implements the
    PreferencesFactory to define the physicalities of the storage.

    Have a look at the API documentation for Preferences, it has all you need
    right in there.

    "Oliver Hirschi" <> wrote in message
    news:bf36dd$a6mca$-berlin.de...
    >
    > "Andy Flowers" <> schrieb im
    > Newsbeitrag news:ca7Ra.12402$...
    > > You don't need to know where they are stored, only that they are

    > persistent.
    > > The API offers the contract that each JVM on each platform implements

    > as it
    > > sees fit, all it has to do is honour the contract.

    >
    > What about different JVMs. Do they use the same Preferences?
    >
    >
     
    Andy Flowers, Jul 16, 2003
    #7
  8. Oliver Hirschi

    Jon A. Cruz Guest

    Andy Flowers wrote:
    > However, in Windows I believe they are stored in the registry, and in
    > Unix/Linux I guess there would be textual properties files.
    >


    Actually, they're xml files stored in hidden directory hierarchies.
     
    Jon A. Cruz, Jul 16, 2003
    #8
  9. In article <oL9Ra.10300$>,
    "Andy Flowers" <> wrote:
    >
    >"Oliver Hirschi" <> wrote in message
    >news:bf36dd$a6mca$-berlin.de...
    >>
    >> "Andy Flowers" <> schrieb im
    >> Newsbeitrag news:ca7Ra.12402$...
    >> > You don't need to know where they are stored, only that they are

    >> persistent.
    >> > The API offers the contract that each JVM on each platform implements

    >> as it
    >> > sees fit, all it has to do is honour the contract.

    >>
    >> What about different JVMs. Do they use the same Preferences?

    >
    >Not sure I understand the question but here's a stab at an answer.


    If, for example, a Windows user switches JVM's, that
    user's Java applications may all fail to find the
    preferences they used to have.

    That's pretty annoying, but from the docs it sounds like
    that could happen.
     
    Chris Riesbeck, Jul 16, 2003
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. kimbuba

    java.util.prefs

    kimbuba, Jul 16, 2003, in forum: Java
    Replies:
    10
    Views:
    3,132
    kimbuba
    Jul 20, 2003
  2. Carsten Zerbst

    webstart and java.util.Preferences ?

    Carsten Zerbst, Jul 16, 2003, in forum: Java
    Replies:
    1
    Views:
    547
    S. Balk
    Jul 16, 2003
  3. Veerle
    Replies:
    3
    Views:
    838
    Phil...
    Oct 24, 2003
  4. Me
    Replies:
    1
    Views:
    411
    Manish Pandit
    Sep 29, 2006
  5. Roedy Green
    Replies:
    10
    Views:
    2,062
    Mark Thornton
    Dec 30, 2007
Loading...

Share This Page