94

I have downloaded and installed the iReport 4.5 using te Windows installer. But when I try to start the iReport it shows the splash screen but does not start.

My JRE version is 8.

bruno
  • 2,213
  • 1
  • 19
  • 31
user2717410
  • 959
  • 2
  • 7
  • 4
  • 3
    JasperReports doesn't support Java 8 yet. – Endrik May 28 '14 at 06:36
  • 4
    And it seems there is no intention to support Java 8. iReport is in maintenance mode until end of 2015 (https://community.jaspersoft.com/project/ireport-designer). Jasper Studio is now the supported tool. See http://superuser.com/questions/607874/ireport-doesnt-work-on-windows-8-64-bit regarding why it doesn't work (NetBeans 7.4, on which iReport is based, has a compatibility issue with Java 8). xtsoler's solution works, although you don't have to change config files or put jre7 in a special dir, you can simply launch iReport pointing to the jre: `ireport --jdk /my/path/to/jre7` – Glenn Dec 24 '14 at 03:57
  • If someone wants to join: https://github.com/wumpz/ireport/issues/3? Even JDK 16 is possible. ;) – wumpz Nov 30 '21 at 06:45

10 Answers10

160

There's another way if you don't want to have older Java versions installed you can do the following:

1) Download the iReport-5.6.0.zip from https://sourceforge.net/projects/ireport/files/iReport/iReport-5.6.0/

2) Download jre-7u67-windows-x64.tar.gz (the one packed in a tar) from https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html

3) Extract the iReport and in the extracted folder that contains the bin and etc folders throw in the jre. For example if you unpack twice the jre-7u67-windows-x64.tar.gz you end up with a folder named jre1.7.0_67. Put that folder in the iReport-5.6.0 directory:

enter image description here

and then go into the etc folder and edit the file ireport.conf and add the following line into it:

For Windows jdkhome=".\jre1.7.0_67"

For Linux jdkhome="./jre1.7.0_67"

Note : jre version may change! according to your download of 1.7

enter image description here

now if you run the ireport_w.exe from the bin folder in the iReport directory it should load just fine.

Timo Giese
  • 55
  • 9
xtsoler
  • 1,750
  • 1
  • 10
  • 7
61

don't uninstall anything. a system with multiple versions of java works just fine. and you don't need to update your environment varables (e.g. java_home, path, etc..).

yes, ireports 3.6.1 needs java 7 (doesn't work with java 8).

all you have to do is edit C:\Program Files\Jaspersoft\iReport-nb-3.6.1\etc\ireport.conf:

# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
jdkhome="C:/Program Files/Java/jdk1.7.0_45"

on linux (no spaces and standard file paths) its that much easier. keep your java 8 for other interesting projects...

tom
  • 2,190
  • 1
  • 23
  • 27
20

iReport does not work with java 8.

  • if not yet installed, download and install java 7
  • find the install dir of your iReport and open the file: ireport.conf

(you will find it here: iReport-x.x.x\etc\ )

change this line:

#jdkhome="/path/to/jdk"

to this (if not this is your java 7 install dir then replace the parameter value between ""s with your installed java 7's path):

jdkhome="C:\Program Files\Java\jdk1.7.0_67"
BlondCode
  • 4,009
  • 1
  • 19
  • 18
  • works with such on old version as iReport-3.7.2 as well – BlondCode May 12 '16 at 07:43
  • So to be understandable: this does not change your (or your company's) default Java settings, that is why i recommend it. This changes iReport's behaviour: iReport will search for the jdk you told it to search for instead of using default Java settings. No matter you will upgrade your Java in the future, iReport will still work till the old Java exists somewhere on your machine. :)I won't downvote the registry hackers, but i would not say registry hacking is a solution.. – BlondCode Oct 10 '16 at 17:19
9

While ireport does not officially support java8, there is a fairly simple way to make ireport (tested with ireport 5.1) work with Java 8. The problem is actually in netbeans. There is a very simple patch, assuming you don't care about the improved security in Java 8:

http://hg.netbeans.org/jet-main/diff/3238e03c676f/openide.util/src/org/openide/util/WeakListenerImpl.java

I didn't even use the exact netbeans source used by ireport. I just downloaded the latest WeakListenerImpl.java in full from the above repository, and compiled it in the ireport directory with platform9/lib/org-openide-util.jar in the compiler classpath

cd blah/blah/iReport-5.1.0
wget http://hg.netbeans.org/jet-main/raw-file/3238e03c676f/openide.util/src/org/openide/util/WeakListenerImpl.java
javac -d . -cp platform9/lib/org-openide-util.jar WeakListenerImpl.java
zip -r platform9/lib/org-openide-util.jar org

I am avoiding running eclipse just to edit jasper reports as long as I can. The netbeans based ireport is so much lighter weight. Running Eclipse is like using emacs.

Stuart Gathman
  • 308
  • 3
  • 7
  • 1
    It relates to this bug: https://netbeans.org/bugzilla/show_bug.cgi?id=229191 But iReport was not updated. – Gilberto Oct 10 '16 at 17:47
  • 2
    Thank you thank you thank you! You are a lifesaver! I tried running ireport 5.6 with Java 8 and saw that it didnt' start. Then I tried to download java 7 but oracle allows *only* oracle customers to download it (!)... So I'd hit a wall until I stumbled upon your solution which worked great! You saved my day :) – Serafeim Jan 04 '19 at 11:22
  • 1
    This is really a much better solution than installing JDK7. I don't know why it has so few votes. While the one line patch disables some improved JDK8 security, the result is no worse (and probably better) than running under JDK7. – Stuart Gathman Jan 05 '19 at 19:25
5

I fixed this on my PC, on my environment iReport was iReport-5.1.0 , both jdk 7 and jdk 8 had been installed.

but iReport did not load

fix:- 1. Find the iReport.conf //C:\Program Files (x86)\Jaspersoft\iReport-5.1.0\etc

  1. Open it on text editor

  2. copy your jdk installation path //C:\Program Files (x86)\Java\jdk1.8.0_60

  3. add jdkhome= into the ireport.conf file jdkhome="C:/Program Files (x86)/Java/jdk1.8.0_60"

enter image description here

Now iReport will work

Ravinath
  • 1,620
  • 1
  • 14
  • 8
5

It works only with JRE 1.7 just download it and extract to your prefered location

and use the following command to open the iReport

ireport --jdkhome Path To JDK Home
Hany Sakr
  • 2,591
  • 28
  • 27
1

With ireport 4.7.1, after setting jdkhome in etc/ireport.conf, ireport.exe doesn't start. No splash, no window.

When I launch ireport_w.exe in a cmd, I get this message:

Error occurred during initialization of VM

Could not reserve enough space for object heap

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.

Solution: In file etc/ireport.conf, on the line starting with default_options, I have reduced the value of -J-XX:MaxPermSize to 256m instead of 512m

default_options="--branding ireport -J-Xms256m -J-Xmx512m
    -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=256m"
Community
  • 1
  • 1
JpTy
  • 11
  • 2
  • Ensure that you don't have any environment variables like `_JAVA_OPTIONS` that will override these settings. I had such an environment variable which was setting the heap size to 1 GB. It took precedence over the `default_options` settings here. Once deleted, iReport ran successfully. – ADTC Nov 25 '15 at 09:23
1

I have installed IReport 5.6 with Java 7: not working

I tried to install Java 6 and added the path to "ireport.conf" file like the attached screenshot and it worked fine :Denter image description here

So the steps is :

 Install IReport 5.6
 Install JDK 6
 Edit "ireport.conf" file like the below image and Enjoy ;)
0

I was tired of searching on google how to run iReport with java 8.

I did everything as said on the Internet,But I don't know why they weren't work for me.

Then I Change My Computer JDK Current Version form 1.8 to 1.7 Using Registry Editor.

Now it work fine.

To Change Current Version

Start => Type regedit (Press Enter) => HKEY_LOCAL_MACHINE => SOFTWARE => JavaSoft => Java Development Kit => Change Key Value of CurrentVersion From 1.8 to 1.7

Raul Cacacho
  • 267
  • 1
  • 4
  • 15
0

For me, the combination of Stuart Gathman's and Raviath's answer in this thread did the trick in Windows Server 2016 for iReport 5.6.0.

In addition, I added a symlink within C:\program files\java\jre7 to jdk8 like this:

cmd /c mklink /d "C:\program files\java\jre7\bin" "C:\Program Files\Java\jdk1.8.0_181\bin"

because iReport was constantly complaining that it could not find java.exe within C:\program files\java\jre7\bin\ - So I served it the available java.exe (in my case V8.181) under the desired path and it swallowed it gladly.

John Ranger
  • 541
  • 5
  • 18