Jump to content

Version 49 and 48 still a problem


greenockboy

Recommended Posts

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 Thanks

GB

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

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?

 

Thanks

GB

Link to comment
Share on other sites

  • 1 month later...

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.

 

Regards

GB

Link to comment
Share on other sites

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...