This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Going Back To Java 1.4.2

 
Mark Newton
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you check the Java Compiler settings under the Project -> Properties menu?
 
Mark Newton
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic