在Netbeans中构建项目时出错 [英] Error while building project in Netbeans

查看:325
本文介绍了在Netbeans中构建项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将项目源从一台PC转移到另一台PC.当我从Netbeans的Run菜单中单击Clean and Build Main Project时,出现此错误:

I am transferring a project source from one pc to another. When I click Clean and Build Main Project from Run Menu of Netbeans, I got this error:

init:
deps-clean:
Updating property file: E:\Backup\My Documents (BackUp)\NetBeansProjects\AccountStatusChanger\build\built-clean.properties
Deleting directory E:\Backup\My Documents (BackUp)\NetBeansProjects\AccountStatusChanger\build
clean:
init:
deps-jar:
Created dir: E:\Backup\My Documents (BackUp)\NetBeansProjects\AccountStatusChanger\build
Updating property file: E:\Backup\My Documents (BackUp)\NetBeansProjects\AccountStatusChanger\build\built-jar.properties
Created dir: E:\Backup\My Documents (BackUp)\NetBeansProjects\AccountStatusChanger\build\classes
Created dir: E:\Backup\My Documents (BackUp)\NetBeansProjects\AccountStatusChanger\build\empty
Created dir: E:\Backup\My Documents (BackUp)\NetBeansProjects\AccountStatusChanger\build\generated-sources\ap-source-output
Compiling 2 source files to E:\Backup\My Documents (BackUp)\NetBeansProjects\AccountStatusChanger\build\classes
javac: invalid target release: 1.7
Usage: javac <options> <source files>
use -help for a list of possible options
E:\Backup\My Documents (BackUp)\NetBeansProjects\AccountStatusChanger\nbproject\build-impl.xml:605: The following error occurred while executing this line:
E:\Backup\My Documents (BackUp)\NetBeansProjects\AccountStatusChanger\nbproject\build-impl.xml:246: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)

我该怎么办?我需要重新安装SDK吗?

what will I do? Do i need to reinstall the SDK?

推荐答案

看起来原始计算机上已安装了JDK 7,并且该项目已配置为目标,但是第二台计算机上的版本较旧.

It looks as if the original machine has JDK 7 installed and the project was configured with that as the target, but the second machine has an older version.

>

  • 您可以将项目配置为定位到1.6或1.5,
    • 如果您需要JDK 7,则必须将其安装在第二台计算机上.

    这篇关于在Netbeans中构建项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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