Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2009
    Posts
    88
    Rep Power
    0

    Default check registry key

    how to check registry key exist or not using java plz

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,458
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by anilkumar_vist View Post
    how to check registry key exist or not using java plz
    You can't do that in Java without any JNI code and/or third party libraries; that registry is a windowism and Java wants to stay far away from any operating system dependent feature.

    kind regards,

    Jos

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,458
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Eranga View Post
    It's possible in may ways. JNI is just a one way.

    Java Examples - How do I read / write data in Windows registry?
    What Java's Preferences consider the system root and user root are the branches:

    HKLM\Software\Javasoft\Prefs\

    and

    HKCU\Software\Javasoft\Prefs\

    respectively; you can't access anything outside or above those branches so the Preferences mechanism isn't a general mechanism to access any arbititrary node in the registry; you need JNI one way or another.

    kind regards,

    Jos

  5. #5
    Join Date
    Oct 2009
    Posts
    88
    Rep Power
    0

    Default

    thanks it helped me

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by JosAH View Post
    What Java's Preferences consider the system root and user root are the branches:

    HKLM\Software\Javasoft\Prefs\

    and

    HKCU\Software\Javasoft\Prefs\

    respectively; you can't access anything outside or above those branches so the Preferences mechanism isn't a general mechanism to access any arbititrary node in the registry; you need JNI one way or another.

    kind regards,

    Jos
    Ya ya, that's true. I just give a guide to OP.

Similar Threads

  1. Access registry
    By kkk in forum Advanced Java
    Replies: 8
    Last Post: 09-01-2009, 12:16 PM
  2. RMI registry
    By tarunkumar in forum Advanced Java
    Replies: 1
    Last Post: 09-30-2008, 08:02 PM
  3. Registry Problem
    By Mir in forum New To Java
    Replies: 1
    Last Post: 07-19-2008, 04:12 PM
  4. SWT Font Registry Example
    By Java Tip in forum SWT
    Replies: 0
    Last Post: 07-07-2008, 04:46 PM
  5. windows registry
    By Fleur in forum New To Java
    Replies: 3
    Last Post: 06-20-2008, 03:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •