Platinum Solutions Corporate Website


Reading the Windows Registry w/ Java

Recently, I had to do something I never had to do before: read the Windows registry from Java. I would have thought this would have come up at some point in my career, but there's a first time for everything.

I ended up using an open source project based on JNI called jRegistryKey - http://sourceforge.net/projects/jregistrykey/. It's super simple to use, you have to drop a DLL somewhere on the Windows path, put a jar on your classpath and then simply use the API and it works like a charm.

Attached a little code snippet that demonstrates the use.

AttachmentSize
DummyRegTest.java_.txt919 bytes

Comments

Anonymous (not verified) Wed, 1969-12-31 19:00

Hi,

A few months ago I also had to read a value from windows registry using a java language. I wrote an article about that - you can read more about that at how to get a ProxyEnable value from windows registry in java.

Best regards,
Javanus

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options