greenockboy Posted June 21, 2007 Share Posted June 21, 2007 Hi Some time ago I posted a problem regarding the version of the JDK that developers might be running against. Any reports containing scriptlets were returning errors when attempting to compile. The error message read:....cannot access java.lang.Object bad class file: C:Program FilesJavajre1.5.0_02librt.jar(java/lang/Object.class) class file has wrong version 49.0, should be 48.0 At my place of work we are using JDK 1.5 but I have found that the problem still persists and I cannot compile reports that rely on a scriptlet within the report. I am using iReport 1.2.7 Is there any work around for this problem? The reason that I ask is that it is not possible for me to return to JDK 1.4.2. Many ThanksGB Link to comment Share on other sites More sharing options...
greenockboy Posted June 22, 2007 Author Share Posted June 22, 2007 Hi I've spent the last day or so looking into this. The problem is that ireport does not like JRE/JDK 1.5 when a report contains a scriptlet. The report will only compile with JDK version 1.4.2. The problem is with jar file 'rt.jar'. Adding this file from JDK 1.4.2 to the iReport classpath does not work. Copying the file from 1.4.2 into 1.5 is not an option as iReport then won't run at all. I have also tried re-installing JDK 1.5 into another folder, but iReport still finds this later version. So, the only solution to this problem would appear to remove any JDK except for version 1.4.2. However, this is a problem if you are running something like Netbeans 5.5 that requires 1.5 or above......and that is the catch 22 situation. I live in the hope that there must be a way to stop iReport roaming the system looking for the latest version of Java SDK and instead force it to look in only the directory containing JDK 1.4.2. Can any of the guru's give an insight into this? ThanksGB Link to comment Share on other sites More sharing options...
greenockboy Posted July 26, 2007 Author Share Posted July 26, 2007 Solution !! As with all these things it was simple. The problem is caused if iReport still has the original tools.jar file in it's library.When an update version of JDK is installed then the tools.jar file must be replaced with the latest one. Hope this helps some people. RegardsGB 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