iReport – Adding jdkhome reference on a Windows machine

General — Jeff Eske on October 22, 2012 at 2:10 pm

I was running into problems while trying to install plugins in iReport.  Some of the plugins were complaining that they needed the Java JDK.

Here’s the error screen I got:

Basically, it says, “Some of the selected plugins require the JDK in order to function.  Currently, NetBeans IDE appears to be running with the JRE instead of the full JDK.  To use these plugins, start IDE with the –jdkhome command line option set to the location of a JDK installation”.

OK, that made sense; I had gone out and downloaded and installed the Java JRE only.  I went back out and downloaded and re-installed Java with the JDK.  Back I go to iReport to try downloading and installing the the iReport Plugins again.  Same thing happens.  Well, first I spent some time trying to figure out how to add the jdkhome parameter to my shortcut.  No luck.

After some searching, I found that the solution was pretty simple.   There’s already a commented spot to add the jdkhome reference in the ireport.conf file.  By simply updating that with the path to where my JDK ended up, I was able to solve the problem.

In my Windows 7 installation, the ireport.conf file is located at: C:\Program Files\Jaspersoft\iReport-x.x.x\etc\ireport.conf,  where x.x.x is the installed version number.  So in the ireport.conf file, I simply uncommented the jdkhome reference and added my path (see below).

The actual path to JDK on my machine – C:\glassfish3\jdk7\

# default location of JDK/JRE, can be overridden by using –jdkhome <dir> switch

After that, iReport started fine and I was able to add the plugins with no problem.

I also learned, when I went to do this entry, that if you have installed plugins that require the JDK, then lose the JDK reference (by commenting it back out, in my instance) you will get a very similar error message when starting iReport.  You can see the error below:

Basically, it says, “The JDK is missing and is required to run some of the the NetBeans modules.  Please use the –jdkhome command line option to specify a JDK installation”.  It’s basically the same error as above, except that it lets you disable the plugins/modules and still start iReport.  Chances are, if you get this message something has happened to your JDK installation.

Jeff Eske



No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | Jeff's Blog