Read/write to Windows registry using Java

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

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

24条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-21 06:26

    As has been noted, the Preferences API uses the registry to store preferences, but cannot be used to access the whole registry.

    However, a pirate called David Croft has worked out that it's possible to use methods in Sun's implementation of the Preferences API for reading the Windows registry from Java without JNI. There are some dangers to that, but it is worth a look.

提交回复
热议问题