使用Eclipse编译java 7 for java 6 [英] Compiling java 7 for java 6 with Eclipse
问题描述
我的程序不使用Java 6中不可用的任何API方法,但它确实使用另一个外部的.JAR的API(它是一个示例程序的基本插件)
有没有一个简单的方法来做到这一点与Eclipse的导出功能,或者我需要使用其他程序/方法吗?
如果我需要使用除Eclipse之外的其他东西,我最好如何做一个多类,多包文件依赖于另一个外部的.jar的API?
右键单击eclipse中的项目并打开项目属性
。
然后导航到 Java编译器
,并将合规级别设置为1.6。
应该这样做。
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).
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)
Is there a simple way to do this with Eclipse's Export function, or do I need to use some other program/method?
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?
Right-click on your project in eclipse and open the project properties
.
Then navigate to Java compiler
and set the compliance level to 1.6.
That should do it.
这篇关于使用Eclipse编译java 7 for java 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!