使用Eclipse编译java 7 for java 6 [英] Compiling java 7 for java 6 with Eclipse

查看:197
本文介绍了使用Eclipse编译java 7 for java 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编译一个项目Java 6使用java 6或7(我不能升级我的生活中的所有计算机)。我一直在搜索,发现有点有用的 stuff ,但我相当新的java - 我不了解如何使用所提供的替代方案(ant-build,Maven,javac)。

I need to compile a project for Java 6 to use with java 6 or 7 (I can't upgrade all of the computers in my life). I've been searching all over and found somewhat helpful stuff, but I'm rather new to java - I don't understand much of how to use the presented alternatives (ant-build, Maven, javac).

我的程序不使用任何在Java 6中不可用的API方法,但它确实使用了另一个外部.JAR(它是一个示例程序的基本插件)的API。

My program does not use any API methods that are not available in Java 6, but it does use the API of another external .JAR (it is a basic plugin for an example program)

有一个简单的方法来使用Eclipse的Export函数,或者我需要使用一些其他的程序/方法吗?

Is there a simple way to do this with Eclipse's Export function, or do I need to use some other program/method?

如果我需要使用Eclipse以外的东西,我最好去做一个多类,多包文件依赖另一个外部.jar的API?

If I need to use something other than Eclipse, how would I best go about doing it for a multi-class, multi-package file dependent on another external .jar's API?

推荐答案

在eclipse中右键单击你的项目, code>项目属性。

Right-click on your project in eclipse and open the project properties.

然后导航到 Java编译器,并将合规性级别设置为1.6。

Then navigate to Java compiler and set the compliance level to 1.6.

>

这样做。

这篇关于使用Eclipse编译java 7 for java 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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