简体   繁体   English

netbeans 项目和 ant 脚本

[英]netbeans project and ant script

I am trying to built a java web application at netbeans (using ant) but there is the error error: Source option 6 is no longer supported.我正在尝试在 netbeans(使用 ant)上构建 java web 应用程序,但出现错误错误:不再支持源选项 6。 Use 7 or later.使用 7 或更高版本。 error: Target option 6 is no longer supported.错误:不再支持目标选项 6。 Use 7 or later.使用 7 或更高版本。 BUILD FAILED (total time: 23 seconds) I thing I have to change a 6 to 7 at built.xml but I can not find the solution,what is wrong? BUILD FAILED (total time: 23 seconds) I thing I have to change a 6 to 7 at built.xml 但我找不到解决方案,怎么了?

You don't need to edit the IDE generated Ant script.您无需编辑 IDE 生成的 Ant 脚本。 You need to change that in the project properties.您需要在项目属性中更改它。

Right click on your project (in the "Projects" window) and select Properties右键单击您的项目(在“项目”窗口中)和 select 属性

In the "Sources" section you need to select JDK 7 in the drop down at the bottom:在“来源”部分,您需要在底部的下拉列表中找到 select JDK 7:

在此处输入图像描述

You should also use a JDK 7 to run and test your application.您还应该使用 JDK 7 来运行和测试您的应用程序。 You can change that in the "Libraries" section of the project (after registering the JDK 7 through Tools -> Java Platforms)您可以在项目的“库”部分更改它(通过工具注册 JDK 7 -> Java 平台后)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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