Ubuntu

NetBeans:無法建構 Java 項目

  • September 26, 2014

我今天在我的舊開發人員 PC NetBeans(最新的)上安裝了我的儲存庫,我從 BitBucket 複製了我的 repo(我開始在 Windows 7 上使用 NetBeans 進行編碼)。我試圖進行乾淨的建構,但編譯器輸出了一個錯誤。

輸出日誌:

ant -f "/home/noel/NetBeansProjects/ProtonBlazt (Git)" -Dnb.internal.action.name=rebuild clean jar
init:
deps-clean:
Updating property file: /home/noel/NetBeansProjects/ProtonBlazt (Git)/build/built-clean.properties
Deleting directory /home/noel/NetBeansProjects/ProtonBlazt (Git)/build
clean:
init:
deps-jar:
Created dir: /home/noel/NetBeansProjects/ProtonBlazt (Git)/build
Updating property file: /home/noel/NetBeansProjects/ProtonBlazt (Git)/build/built-jar.properties
Created dir: /home/noel/NetBeansProjects/ProtonBlazt (Git)/build/classes
Created dir: /home/noel/NetBeansProjects/ProtonBlazt (Git)/build/empty
Created dir: /home/noel/NetBeansProjects/ProtonBlazt (Git)/build/generated-sources/ap-source-output
Compiling 17 source files to /home/noel/NetBeansProjects/ProtonBlazt (Git)/build/classes
javac: invalid target release: 1.8
Usage: javac <options> <source files>
use -help for a list of possible options
/home/noel/NetBeansProjects/ProtonBlazt (Git)/nbproject/build-impl.xml:923: The following error occurred while executing this line:
/home/noel/NetBeansProjects/ProtonBlazt (Git)/nbproject/build-impl.xml:263: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)

build-impl.xml 在這裡:http ://pastebin.com/kt3G9dPS

我希望任何人都可以解決這個問題。

問候

地雷

很抱歉,您應該認真閱讀輸出日誌的每一行,以了解錯誤發生的原因。這是錯誤行:

javac: invalid target release: 1.8

這意味著您沒有適用於 Java 1.8 版的 JDK,我建議您在Google上搜尋此錯誤,這樣您就可以看到其他答案

引用自:https://unix.stackexchange.com/questions/157552