Hi,
I have downloaded a 3:rd party jar file. When I try to run my code (
using the API) I get the following error:
class file has wrong version 49.0, should be 48.0
AFAIK: The class file i generated using jdk 1.5 and I try to execute it
using jdk 1.4.
I cannot change jdk but use 1.4 ( sniff).
The provider of the jar file has the following requirements:
Requirements
Java2HTML is written in Java and therefore needs a Java 1.1 or above
compatible JVM
Is there a way around this?
cheers,
//mikael
|
|
0
|
|
|
|
Reply
|
Petterson
|
6/27/2007 7:47:22 AM |
|
"Petterson Mikael" <mikael@no.reply.to.se> wrote:
> AFAIK: The class file i generated using jdk 1.5 and I try
> to execute it using jdk 1.4.
When you write "generated", I assume you mean "compiled"...
> I cannot change jdk but use 1.4 ( sniff).
I assume you mean that you run it on another machine, having only jre 1.4.
From what I can guess of your post, you have two main options, of which you
could try the first one first:
1. Compile with jdk 1.5, but use the switch "-target 1.4"
http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javac.html
Also look at the cross-compilation example at the bottom of that page.
If that still doesn't work...
2. Download the 1.4 jdk to your development machine as well, and
use that when compiling this code.
Most IDE's for Java have the possibility to switch between different jdk:s,
so there's no need to remove 1.5.
/// Bjorn A
|
|
0
|
|
|
|
Reply
|
Bjorn
|
6/27/2007 10:18:10 AM
|
|
On Wed, 27 Jun 2007 09:47:22 +0200, Petterson Mikael
<mikael@no.reply.to.se> wrote, quoted or indirectly quoted someone who
said :
>I have downloaded a 3:rd party jar file. When I try to run my code (
>using the API) I get the following error:
>
>class file has wrong version 49.0, should be 48.0
>
>AFAIK: The class file i generated using jdk 1.5 and I try to execute it
>using jdk 1.4.
>
>I cannot change jdk but use 1.4 ( sniff).
>
>The provider of the jar file has the following requirements:
>
>Requirements
>Java2HTML is written in Java and therefore needs a Java 1.1 or above
>compatible JVM
>
>Is there a way around this?
He has presumably used JDK 1.5 features and methods not available in
JDK 1.4. What can you do?
1. upgrade to JDK 1.6.
see http://mindprod.com/jgloss/jdk.html
JDK 1.4 came out 2002-02-13. That is 5 years ago an extremely long
time in net years. That was even before the Iraq war started.
2. decompile the code, and modify it to avoid JDK 1.5 features. If
you are lucky there won't be any. Any Genericity disappears on
decompilation. see http://mindprod.com/jgloss/decompiler.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
|
|
0
|
|
|
|
Reply
|
Roedy
|
6/28/2007 1:38:51 PM
|
|
|
2 Replies
1620 Views
(page loaded in 0.327 seconds)
Similiar Articles: class file has wrong version 49.0, should be 48.0 - comp.lang.java ...Hi, I have downloaded a 3:rd party jar file. When I try to run my code ( using the API) I get the following error: class file has wrong version 49.... Jdk 1.6 will not compile: cannot access java.lang.Object - comp ...... java:45: cannot access java.lang.Object >>> bad class file: C:\Tools\Jdk16\jre\lib\rt.jar(java/lang/Object.class) >>> class file has wrong version 49.0, should be 48.0 ... how to convert HP 48 libraries (wrong ROM version)? - comp.sys ...class file has wrong version 49.0, should be 48.0 - comp.lang.java ..... file has wrong version 49.0, should be 48.0 - comp.lang.java ... 2. Download the 1.4 jdk to your ... JDK 1.6.0_22 attempt 2 - comp.lang.java.programmerclass file has wrong version 49.0, should be 48.0 - comp.lang.java ... JDK 1.6.0_22 attempt 2 - comp.lang.java.programmer class file has wrong version 49.0, should be 48.0 ... JDK 1.6.0_21 released - comp.lang.java.programmerJDK/JRE JDK 1.6.0_21 released. See http ... There is no harm in being sometimes wrong ... comp.lang.java.programmer libmawk 0.9.3 released - comp.lang.awk pigz version 2.1.6 ... pigz version 2.1.6 released - comp.unix.programmerJDK 1.6.0_22 attempt 2 - comp.lang.java.programmer pigz version 2.1.6 released - comp.unix.programmer class file has wrong version 49.0, should be 48.0 - comp.lang.java ... JDK 1.6.0_23 released - comp.lang.java.programmerpigz version 2.1.6 released - comp.unix.programmer 0 Replies 257 Views (0.07 seconds) Tweet ... 49.0, should be 48.0 - comp.lang.java ... pigz version 2.1.6 released ... JVM error (from JDeveloper) - comp.lang.java.helpclass file has wrong version 49.0, should be 48.0 - comp.lang.java ... JVM error (from JDeveloper) - comp.lang.java.help class file has wrong version 49.0, should be 48.0 ... file size in mb - comp.sys.hp.hpuxUtility to shrink PDF files - comp.text.pdf file size in mb - comp.sys.hp.hpux Utility to ... class file has wrong version 49.0, should be 48.0 - comp.lang.java ... How to check pdf files for errors? - comp.text.pdfHi, is it possible to scan pdf files for errors (syntax errors, pdf version, etc.)? ... D-55099 Mainz Germany Tel. +49-(0)6131/39 ... for non-errors such as missing fonts/wrong ... "bad class file. class file has wrong version 50.0, should be 4x.0."Q183240 - ERRMSG: "bad class file. class file has wrong version 50.0, should be 4x.0." ... Version 50.0 = Java 1.6.x Version 49.0 = Java 1.5.x Version 48.0 = Java 1.4.x class file has wrong version 49.0, should be 48.0Eclipse plugin development tools for Java, JSP, XML, Struts, HTML, CSS and EJB 7/23/2012 8:23:19 AM
|