john_1 Posted March 11, 2013 Share Posted March 11, 2013 I have written some custom Java code using Eclipse and Java 1.7.0_u17 on Windows 7, to provide special formatting in an iReport. It's nothing very special, and uses quite standard Java functions that should run under any moderately recent version of Java.When I deploy the report and the custom code to JasperServer and try to run it, I get a runtime error (major/minor version error 51.0) which seems to suggest that there's a version incompatibility between what JasperReports Server is running (which seems to be Java v1.6_u20) and either the custom code .jar, or my report designed in iReport 5.0.1 for Windows, also which I guess is also using Java 1.7.0_u17 as I think that's the only version on the Windows machine.How can I get JasperServer to use the (installed) Java 1.7, which is in /usr/java/default/java (the same as /usr/java/jdk1.7.0_17) ?I've tried editing /scripts/setenv.sh and also /apache-tomcat/scripts/ctl.sh, to set the variables JAVA_HOME and JRE_HOME, but to no effect - tomcat still shows JRE_HOME as [jasperinstall]/java (or /opt/jasperreports-server-cp-5.0.0/java).Should I set the environment variables $JAVA_HOME and $JRE_HOME instead? If so, how do I do that so they are set permanently and will survive a server reboot?Or should I just recompile and re-package the custom code in Eclipse under Java 1.6_u20 to match JasperReports Server?Thanks in advance for any advice to help me resolve this error.John McC Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now