2014-10-16 56 views
0

我想編譯一個HTML項目,從this youtube video。但是,當我正在運行HTML外部工具,它給了我一個錯誤:Lib GDX html運行錯誤,系統Java編譯器(Eclipse)(Windows 7)

Configuration on demand is an incubating feature. 
:core:compileJava FAILED 

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':core:compileJava'. 
> Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory. 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

BUILD FAILED 

Total time: 2.297 secs 

我在互聯網上搜索,但我沒有找到它爲我工作的解決方案。有誰能夠幫助我?

回答

0

對不起,我的英文,雖然我不使用Windows,但我認爲你必須安裝Java JDK,如果你沒有它,尋找這個,我認爲他必須做這樣的事情:

1右鍵單擊桌面上的我的電腦圖標,然後選擇屬性。

2單擊高級選項卡。

3單擊環境變量按鈕。

4在系統變量下,單擊新建。

5輸入變量名稱作爲JAVA_HOME。

; C:\ Program Files文件\的Java \您的版本JAVA JDK \ src.zip

0

它實際上是行不通的。如果我將loc設置爲:C:\ Program Files \ Java \ jre7它給出了我在第一篇文章中顯示的錯誤。

如果我設置祿來:C:\ Program Files文件\的Java \ jre1.8.0_25 \ BIN

ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jre1.8.0_25\bin 

Please set the JAVA_HOME variable in your environment to match the 
location of your Java installation. 

我試圖C:\ Program Files文件\的Java \ jre1.8.0_25 \庫,但一樣。

順便說一句:我沒有JDK,我只有JRE ..我從java的web下載了一個JDK,安裝了它,並且在我的Java文件夾中只出現了JRE。