简体   繁体   中英

“Run as” not working in Eclipse Juno

I am using Eclipse Juno, trying to use TestNG and Selenium to do some testing. When I write my java file to run the test, as per instruction, I should be able to right click and then see "run as" with an arrow and some options, including TestNG - but I get no options, and cannot see TestNG. I also get the following error but am not clear if its related:

An internal error occurred during: "Compute launch button tooltip". Bad version number in .class file

Can anyone help?

Ps someone will probably say "you have the wrong version of the jdk or a mismatched version" which may be true but can you tell me how/where to check / change this?

Navigate to your Java project, right-click, navigate to Build Path > Configure Build Path.. , and then select the "Libaries" tab. It's there that you can set the Java library used by your project. And then you'll probably want to clean your project and rebuild.

Right click java project and select Build path ->Configure build path. There check the jdk version and java compiler version. Change compiler version to jdk version. Clean and build the project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM