I've recently installed Jasperserver and Jaspersoft Studio to work with JasperReports. After creating a database connection to my PostgreSQL database and building a report from that database, I'm getting the following warning in Jaspersoft Studio, which I've been unable to resolve.
Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment.
I found the configuration didn't have an associated JRE System Library, so I tried using the JRE System Library [JavaSE-1.6] installed with Jaspersoft Studio, which does not resolve the problem. I have also tried to use jre.linux.gtk.x86_64.feature_1.8.0.u65, and CDC-1.0/Foundation-1.0(jre.linux.gtk.x86_64.feature_1.8.0.u65) without success.
This must be a configuration issue, but I've been unable to locate a resource on the web to resolve the configuration problem.
If you are new to the Eclipes environment and to Jaspersoft Studio, this complete answer will help you achieve success in removing the warning.
- With the project active in the Design view, select Project from the main menu bar and the Properties option at the bottom of the dropdown. If your project is not active, Properties will be disabled. To activate the Properties option, select the Design view near the lower one third of the IDE page in the middle pane, then click inside the page area of your design view. Not Properties in the Project menu should be active.
- In the far left panel of the dialog, select the "Java Build Path" from the available options.
- Add Library from the buttons in the far right of the dialog.
- Select "JRE System Library" from the options, and the Next > button.
- Select the "Execution environment:" radio option, which should automatically populate the JRE System Library available. If it doesn't, try using the "Alternate JRE:". All of this step assumes that you have a JRE installed on your system, which is not the default library installed by Jaspersoft Studio.
- Select the Finish button.
- This step is important, because if you don't remove the library installed in your project by default, the warning will not disappear. Select JRE System Library[J2SE 1.6] from the middle section labeled "JARs and class folders on the build path:", select the Remove button on the right.
- Select the Apply button, then the OK button.
At this point, clean your project and rebuild it. The warning should be gone.
Even though this answer is specific to Jaspersoft Studio, and the JRE System Library[J2SE 1.6], you may be able to extrapolate this solution to other platforms, but this assumes the interface has not significantly changed.
来源:https://stackoverflow.com/questions/34613580/jaspersoft-studio-6-2-build-path-warning