Jaspersoft Studio config with Java 1.5 and JasperReports 4.1.2

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

Hi everyone!

I just started using Jaspersoft Studio and I am configuring it for my new project. I need to work with Java 1.6 and JasperReports 4.1.2, but the changes in my project configuration do not seem to make any effect. I have used eclipse  and eclipse-based apps before, but this time I cannot make it save the configurations the way I want it.

* In my project properties I went to JasperSoftstudio (on the left), activated "Use Project Settings" and then chose JasperReports 4.1.1 (because 4.1.2 was not available). Even after a rebuild, in my project's JasperReportsLibrary I still see the jars corresponding to the last version of JasperReports. How can I solve this? Do I need to set the jar manually? If so... how should I do it? Should I remove the JasperReports Library automatically generated and put the jar for 4.1.2 instead? Or maybe this just does not matter?

* Now, I knew I needed to add the path to my Java 1.5 installation, but... I just cannot find the way to do it! This is what I did:
  + Open my project properties.
  + Go to JavaBuildPaht (on the left).
  + Go to the Libraries tab.
  + Remove the jre included.
  + Click on Add Library.
  + Choose JRE System Library.
  + Choose Alternate JRE.
  + As the desired JRE is not on the list, click on Installed JREs.
  + This opens a window with java General options (filtered) that just does not work. I cannot choose any other option. If I erase the filter, I will see the regular Preferences, but I could not find where to add a JRE.

* I also tried this:
  + I set the Compiler compilance level to 1.5 (using my project's properties window under Java Compiler).
  + Then an alert appears at the bottom saying: ...make sure to have a compatible JRE installed and activated (currently 1.7). Configure the Installed JREs and Execution Env, or change the JRE on the JavaBuildPath.
  + Each one of the three options is a link, supposed to take me to the right window... but surprise! If I click on Installed JRE, the same useless windows with java General options appears.
  + If I choose Execution Envs... same thing: useless window.
  + JavaBuildPath does take me to the build path section, but I cannot add a new JRE library, as described above.

I think there may be a bug with the windows, but I am sure that I can modify a file that will save the right JRE and JasperReports versions that I want to use. If anyone knows where I can find those files, let me know!

Thanks for your help!
Laura.

laujunk's picture
33
Joined: Nov 6 2013 - 11:04am
Last seen: 8 years 6 months ago

3 Answers:

Hi Laura,
Jaspersoft Studio ships with the last version available of JasperReports. The settings that you have configured is the compatibility one, correct me if I'm wrong, from "Project Properties > Jaspersoft Studio > Version".

This gives you the ability to create report that once saved will be persisted for the specific JasperReports version you chose in settings.
However this does not mean that we ship with all the possible JR versions you see in the combo box. 

I think that if you need to write some specific Java code that uses a particular JR version, you will have to download the dedicated jars from the JR project page and add them to your classpath. Even better maybe to have a specific Java Project for this, in order not to mix the different JR libraries.

Best regards,
Massimo.

mrabbi's picture
19814
Joined: Oct 31 2011 - 9:20am
Last seen: 5 hours 56 min ago

Hi Massimo!

Thanks for your answer. I guessed exactly what you told me: not all the versions are included and the generated version will be compatible with the version that I specified (even if the corresponding jars are not used by JasperSoftStudio, those are to be included by me in the project where I plan to use the generated .jasper). However, that was not so important, I used 4.1.1 and it was fine (I only needed it to be compatible with Java 1.5).

Nevertheless, my main problem remained: how to get JasperSoftStudio to work with Java 1.5 libraries. I could not get it work. I ended up switching to iReports. There, everything runs smoothly.

Thanks for your help.

Laura.

laujunk's picture
33
Joined: Nov 6 2013 - 11:04am
Last seen: 8 years 6 months ago

More than eight years ago, but no further traces of "Massimo" neither anyone bothered giving a damn about this matter, even if it's full of questions and tickets everywhere.

pere.pasqual's picture
Joined: Sep 17 2020 - 1:45am
Last seen: 2 months 3 days ago
Feedback