facebook

[Closed] UnsupportedClassVersionError

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #265917 Reply

    julzmagoo
    Member

    I know this error has bounced around the forums a bit, but I can’t seem to find a solution that works for me.

    I am using Eclipse 3.2, MyEclipse 5.0, and Java 1.4.2. I cannot use Java 5.0 at this point. I am pointing to 1.4 in the Installed JREs, set the compiler compliance to 1.4, and have Tomcat 5.5 using 1.4.

    Everything works just fine until I go to run an ant build. That’s when I get the error:

    BUILD FAILED
    java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main (Unsupported major.minor version 49.0)

    Is there something I’m missing?

    TIA,

    Jules

    #265933

    Greg
    Member

    Go to Project > Properties > MyEclipse > XDoclet > Build > Java Language Support and set it to java 1.4.2. This will rebuild your xdoclet config and the next time you run it, it should not have a problem launching.

    #265934

    julzmagoo
    Member

    Hi Greg,

    Thanks for responding. Java Language Support is already set to 1.4.2. I am still getting the same error. Any other thoughts?

    #265940

    Greg
    Member

    Have you tried changing the option to java5?

    #265977

    julzmagoo
    Member

    Neither option works 😕

    #266001

    Scott Anderson
    Participant

    Jules,

    It’s likely that the default JRE in your system is set to a Java 1.5 instance. You can set it to 1.4.2 at Window > Preferences > Java > Installed JREs. Compiling with Java 1.5 and running with 1.4 is the only thing that will cause what you’re seeing, so that is definately what is hapening.

    #266055

    julzmagoo
    Member

    Scott,

    Installed JRE’s is set to 1.4.2. I don’t even have 1.5 on my computer anymore, but now that you mention it, I did have it on my computer when I was doing the bulk of the project’s development. So, it makes sense that it was compiled with java 5. I’ve tried to rebuild the project, but I’m still having no luck. I can’t get the ant build to work. Now I know I’m just doing something stupid, but I’m still stuck.

    #266063

    Scott Anderson
    Participant

    Instead of an Ant build, why not let MyEclipse just build the project normally then use the class files it generates in whatever Ant process you’re trying to run.

    #266067

    julzmagoo
    Member

    Well, I rebuilt the project again, and this time it worked. A step in the right direction. Now I just need to figure out why I can’t get the .war file to start in the Tomcat Manager… but I suppose that’s for another forum.

    Thank you very much for your help. You guys are a lot nicer than some others I’ve run into on other forums 🙂

    Thanks again!

    #266113

    Scott Anderson
    Participant

    Now I just need to figure out why I can’t get the .war file to start in the Tomcat Manager… but I suppose that’s for another forum.

    Take a look at our Working with Web Projects quickstart. You don’t have to even use the Tomcat manager for our deployer to get your project started in Tomcat. Super easy.

    Thank you very much for your help. You guys are a lot nicer than some others I’ve run into on other forums 🙂

    We aim to please. 😉

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: [Closed] UnsupportedClassVersionError

You must be logged in to post in the forum log in