Read/write to Windows registry using Java

前端 未结 24 1552
日久生厌
日久生厌 2020-11-21 05:45

How is it possible to read/write to the Windows registry using Java?

24条回答
  •  无人及你
    2020-11-21 06:11

    Although this is pretty old, but i guess the better utility to use on windows platform would be regini :

    A single call to process:

    Runtime.getRuntime().exec("regini ");
    

    will do all the magic. I have tried it, while making jar as windows service using servany.exe which requires changes to made in registry for adding javaw.exe arguments and it works perfectly. You might want to read this: http://support.microsoft.com/kb/264584

提交回复
热议问题