-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ralph Niemitz <[email protected]>
- Loading branch information
Showing
1 changed file
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,44 @@ | ||
# SimpleRegistry | ||
A Java library for reading and editing the Windows registry | ||
# Description | ||
SimpleRegistry is pure Java library that grants you read and write access to the Windows registry. | ||
|
||
# Requirements | ||
- Java 8 or later | ||
- Windows Vista or later (XP and older systems are not supported) | ||
|
||
# Setup | ||
Just put the Java archive on your build path. | ||
|
||
# Example | ||
```java | ||
public static void main(String[] args) { | ||
|
||
try { | ||
|
||
// Creating Keys | ||
Registry.setKey(Registry.HKEY_CURRENT_USER + "\\Software\\MyExampleSoftware"); | ||
Key mySoftwareKey = Registry.getKey(Registry.HKEY_CURRENT_USER + "\\Software\\MyExampleSoftware"); | ||
mySoftwareKey.setValue("myExampleValue", Value.Type.REG_SZ, '\0', "Hello World!"); | ||
mySoftwareKey.reload(); | ||
System.out.println(mySoftwareKey.getValueByName("myExampleValue")); | ||
|
||
// Reading keys | ||
Key key = Registry.getKey(Registry.HKEY_CURRENT_USER + "\\Software"); | ||
|
||
for(Key child : key.getChilds()) { | ||
|
||
System.out.println(child.getName()); | ||
} | ||
|
||
// Removing Keys | ||
Registry.deleteKey(mySoftwareKey.getPath()); | ||
|
||
} catch(IOException exception) { | ||
|
||
exception.printStackTrace(); | ||
} | ||
} | ||
``` | ||
|
||
# Links | ||
See the [download page]() | ||
See the [online documentation]() |