Results 1 to 5 of 5
  1. #1
    tataxa206 is offline Member
    Join Date
    Aug 2009
    Posts
    3
    Rep Power
    0

    Red face How to create, getValues, setValues key registry with type = REG_DWORD ?

    I have a java desktop application and i want create key in registry with type is REG_DWORD after i can setValues and getValues it.
    can you help me?
    Thanks !

  2. #2
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    Are you sure? Java is supposed to be multi-platform, while the registry is Windows only. You're likely to find this task highly non-trivial.
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

  3. #3
    fxRichard is offline Member
    Join Date
    Dec 2008
    Posts
    64
    Rep Power
    0

    Default

    If I remember correctly the java.utils.prefs.Preferences class will allow you to do this BUT ONLY to an extent meaning you are only allowed to set/get keys for your specific app which is stored in a specific location...I don't remember exaclty where your key is stored but I want to say it's something like HKCU/software/java/... or something along those lines. If you want to access other parts of the registry the elegant way is via JNI, there is also another way but I will not even mention it as it's not ideal and bad practice. I have a c++ utility I wrote with the JNI code necessary to do just this but it's fairly specific for my software so it probably would not be of any use to you.

  4. #4
    vkorenev is offline Member
    Join Date
    Aug 2009
    Location
    Kharkov, Ukraine
    Posts
    29
    Rep Power
    0

    Default

    I think you have to use JNI. Consider using JNIWrapper: www.jniwrapper.com

  5. #5
    tataxa206 is offline Member
    Join Date
    Aug 2009
    Posts
    3
    Rep Power
    0

Similar Threads

  1. Replies: 4
    Last Post: 03-25-2009, 05:54 AM
  2. RMI registry
    By tarunkumar in forum Advanced Java
    Replies: 1
    Last Post: 09-30-2008, 09:02 PM
  3. Registry Problem
    By Mir in forum New To Java
    Replies: 1
    Last Post: 07-19-2008, 05:12 PM
  4. SWT Font Registry Example
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 07-07-2008, 05:46 PM
  5. could not be found in the registry
    By alam99 in forum Eclipse
    Replies: 0
    Last Post: 01-08-2008, 09:21 AM

Tags for this Thread

Posting Permissions

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