How can I read a win Registry value in Java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • celiaachkar
    New Member
    • Jul 2007
    • 12

    #1

    How can I read a win Registry value in Java

    hello everyone,
    I'm Celia and I 'd like to know how can I read the value of a a Win (XP) registry in
    Java?
    If someone could help me with that.

    Thank you!

    Celia
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by celiaachkar
    hello everyone,
    I'm Celia and I 'd like to know how can I read the value of a a Win (XP) registry in
    Java?
    If someone could help me with that.

    Thank you!

    Celia
    You can't do that; reading/writing registry values is highly platform dependent
    and Java is supposed to know zilch about the platform it runs on. You have to
    use JNI (Java Native Interface) for those purposes. If you do so you tie your
    program to one single platform, e.g. it won't run on Linux or whatever non Windows.

    kind regards,

    Jos

    Comment

    • celiaachkar
      New Member
      • Jul 2007
      • 12

      #3
      Thank you Jos for your answer.

      Celia

      Comment

      Working...