I have report with ejbql datasource wich entity was build under jdk 1.7, so during preview I have following error "Unsupported major.minor version 51.0". I have same error then I run this report in iReport but I change jdkhome param in ireport.conf and all build successfully. What config I need change in JasperSoft Studio (setup like sepparate eclipse plugin) for building my report(all eclipse enviroment set for jdk 1.7)
2 Answers:
Your preview is using an older version of Java. the '51' maps to 1.7. This is why it works in eclipse, its using Java 1.7.
major version number of the class file format being used.
J2SE 7 = 51 (0x33 hex),
J2SE 6.0 = 50 (0x32 hex),
J2SE 5.0 = 49 (0x31 hex),
JDK 1.4 = 48 (0x30 hex),
JDK 1.3 = 47 (0x2F hex),
JDK 1.2 = 46 (0x2E hex),
JDK 1.1 = 45 (0x2D hex).
Reference:
- http://en.wikipedia.org/wiki/Java_class_file
- http://stackoverflow.com/questions/10382929/unsupported-major-minor-version-51-0
Hi,
first of all can you better explain what you mean with "JasperSoft Studio (setup like sepparate eclipse plugin)"?
This means you are using the standalone version, right? If yes which version?
To have a better idea of your system config, please answer the questions below:
- how many java installation do you have in your system
- which output do you get from command line: java -version
Please also check what is the JRE/JDK actually configured in JSS.
If you are using Jaspersoft Studio standalone you will not probably see "Installed JREs" item. You need to enable the Java capabilities: some stuff is actually hidden for non-technical users. To enable them do like this:
Another important thing. Is it possible that the jar (I suppose your entities are in there) you have was produced with a jdk7update5 and now in your system you have a jdk7update3? In other words the major version is the same, but minor one is not.
Best regards,
Massimo