从Eclipse中更改Java版本 [英] Changing Java Version From Within Eclipse

查看:181
本文介绍了从Eclipse中更改Java版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在eclipse中使用较旧版本的java编写了一个项目。
现在在不同的电脑上运行相同的代码,我得到了很多红色。



这是由于版本不兼容。
我的教授已经从控制台窗口中更改了Java版本。他这样做后编译的代码很好。我确定与此代码相同。



在查看其他教程和Google链接后,我只能找到命令行方法和@override方法。说实话,我还是不明白这些。



什么是最好的方法来更改最初在eclipse控制台中的旧代码编写的代码?
谢谢!

解决方案

在eclipse中转到窗口 - >偏好 - > Java - >编译器,那里可以更改java版本。希望有帮助。


I wrote a project in eclipse with an older version of java. Now on a different computer but running the same codes I'm getting a whole lot of red.

This is due to Version incompatibility. I've had my professor change the Java version from within the console window before. The code compiled just fine after he did so. I'm sure its the same case with this code.

After looking at other tutorials and google links I could only find command line approaches and @override methods. To be honest I still don't understand these.

What is the best way to change the version of a code originally written in an older code inside the eclipse console? thanks!

解决方案

In eclipse go to Window -> Preferences -> Java -> Compiler, there you can change the java versions. Hope it helps.

这篇关于从Eclipse中更改Java版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆