This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

(Unsupported major.minor version 49.0) ?  RSS feed

 
Tempora Telora
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been reading up on this and most people are saying that it is when using the 1.5 rather than 1.4

Are there any work arounds?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you create class files using javac.exe from JDK 1.5 in the default mode, then they won't work on JDK 1.4. If you create then on 1.4, they'll work on both.

Alternatively, you can use "javac -source 1.4 -target 1.4" under JDK 1.5, and again the class files will work on both JDK versions.

But if you do that -- or if you compile using 1.4 -- then you can't use any JDK 1.5 language features or new APIs.
 
Tempora Telora
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what would be the best course of action?

Should I try dl 1.4?

Should I try and workaround within my code?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16026
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Randy Tatham:
I have been reading up on this and most people are saying that it is when using the 1.5 rather than 1.4


The error message means that you have a class file which was compiled with Java 1.5, and you are trying to run it on Java 1.4. That won't work.

If your classes need to be able to run on Java 1.4, it's best to download and use JDK 1.4.

(You can use the "-source" and "-target" switches, but that would still get you into trouble when you try to use an 1.5 only API).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!