Developers, Developers, Developers! Maksim Sorokin IT Blog


IzPack Panels: Things You Have to Know When Developing Registry Panels

There are certain things one has to know when developing panels that interact with registry.

CheckedHelloPanel is an example of interaction with a registry. If you decide to go that way, you will need to do some additional things too besides writing the code.

First of all, you will need to define a COIOSHelper.dll in your install.xml:

<native type="3rdparty" name="COIOSHelper.dll" stage="both">
  <os family="windows"/>

The second thing is that if you take a look into CheckedHelloPanel code, you will see, that it also uses some code. You will need to include that into your panel jar too.
Here is the way how we do it. First, we took this and put it to our maven repository. For each our custom IzPack panel we have a separate maven module nesting some common parent routine (I have already described it in one of the previous posts. Then during package phase of our custom panel code we use Maven Shade Plugin to combine sources of and our panel code.

The third thing deals with development cycle. If you develop your own custom panel to work with registry using the way , you will need to place dlls inside "izpack" project.
Create src\native folder and copy dlls from bin\native directory in IzPack installation. Then you could use them inside install.xml:

<native type="3rdparty" name="COIOSHelper.dll" stage="both">
  <os family="windows"/>

This is because com.izforge.izpack.util.Librarian in IzPack has to know where to find the dlls. Since we import only the sources to Eclipse, dlls are not imported, so we have to do that manualy.


Working with Windows Registry in Java 3

jRegistryKey library actually is under LGPL. So it is suitable to be used in commercial projects too! Very simple library, that just works!


Working with Windows Registry in Java 2

Ok, so the way to read registry data, which I described in previous post may be not a good idea. It is safer to rely on Windows Reg command. I wrote a simple utility to query registry using that utility.

  • isExists finds whereas registry path exists
  • get gets the value for specific key on certain registry path