rep-- to increase awareness of not using platform specific code in java for a problem which has other solutions
|
Hello people, This is a tutorial on the windows registry with implementation of a registry in java or more than one registry.
First download the jar -> jRegistryKey | SourceForge.net
This would create "Test" as the name and create the registry as "Something".Code:package registry; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RegistryValue; import ca.beq.util.win32.registry.RootKey; import ca.beq.util.win32.registry.ValueType; public class JRegistry { public JRegistry(){ RegistryKey.initialize(); RegistryKey r= new RegistryKey(RootKey.HKEY_CURRENT_USER, "Software\\Something"); r.create(); RegistryValue v = new RegistryValue("Test",ValueType.REG_DWORD, 0x00000001); r.setValue(v); } public static void main(String[] args){ new JRegistry(); } }
To check if this works go to C:\Windows\System32/regedt32.exe
This is the windows registry that stores computer data and other things that programs store in.
You can also check if a virus such as Backdoor Agents is running on your computer on start up.
The Windows Registry is a very powerful tool.
WARNING: Do not play with the Windows Registry unless you know what you know what your doing.
You can remove your task manager from your computer or even your windows registry access.
If you can remove your registry from your computer then good luck trying to get it back.
If you have any questions or anything message me or comment down below.
P.S. you can also delete/remove it from the registry if you want.
Enjoy.
absolutely zero reason to ever introduce the windows registry to Java
not to mention JNA does this much better then using some library specifically built for the purpose
no i mean Properties (Java Platform SE 7 )
the registry is effectively a key, value store
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |