Jump to content

Jaspersoft Studio config with Java 1.5 and JasperReports 4.1.2


laujunk

Recommended Posts

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.

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 8 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...