Eclipse won't compile, bad class file, wrong version

后端 未结 9 1140
面向向阳花
面向向阳花 2021-01-18 01:46

I am trying to compile code checked out of SVN from another developer. Eclipse has been giving me a lot of trouble lately.

Here are my project-specific settings:

9条回答
  •  有刺的猬
    2021-01-18 02:19

    The error message means that the compiler tool included in tool.jar your Ant is using is of older version than the class it attempts to compile. Message "[javac] class file has wrong version 50.0 should be 49.0" would mean that your class file needs jdk 6.0 but your tool.jar comes from jdk 5.0 distribution. To switch to correct tools.jar in eclipse open Window>Preferences>Ant>Runtime>Global Entries.

提交回复
热议问题