This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes Going Back To Java 1.4.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Going Back To Java 1.4.2" Watch "Going Back To Java 1.4.2" New topic
Author

Going Back To Java 1.4.2

Mark Newton
Ranch Hand

Joined: Jan 31, 2006
Posts: 129
Hi All,

I'm sure that I'm being very stupid here, and it's the end of the day, so I'll probably see the problem straight away tomorrow morning, but maybe someone will have a handy pointer...

I've written and built an application, compiling with version 5 of Java (using Eclipse). I've now decided/realised that I actually need it to run with 1.4, so have changed the compiler (in Preferences/Java/Compiler) to 1.4, and added and selected the 1.4.2 JDK (Preferences/Java/Installed JREs).

I got all the compile errors that I expected, and have fixed them all, but now when I try to run, I get:

java.lang.UnsupportedClassVersionError: **classpath** (Unsupported major.minor version 49.0)

From reading around I see suggestions that the problem is that my code is being built by the 1.5 compiler, but I'm trying to run it with a 1.4 JVM. Makes sense. So - the question is, how do I compile it with the 1.4 compiler? I'd have thought that one/both of the settings I mention above would have done it, but apparently not?

Any help greatly appreciated.

PS - I've tried cleaning the project, to no avail.
Chris Rudd
Greenhorn

Joined: Nov 22, 2006
Posts: 6
Did you check the Java Compiler settings under the Project -> Properties menu?
Mark Newton
Ranch Hand

Joined: Jan 31, 2006
Posts: 129
Originally posted by Chris Rudd:
Did you check the Java Compiler settings under the Project -> Properties menu?


Thanks for the suggestion - it wasn't that (the 'enable project specific settings' checkbox was not checked), however, it *was* something stupid - I needed to rebuild a jar file that I was using. So much for working late...
 
GeeCON Prague 2014
 
subject: Going Back To Java 1.4.2