2017-02-09 49 views
1

我想潛入CN1中。我使用git跟着thisthis tutorial。但是,在NetBeans中,當我按住Ctrl鍵並點擊一個CN1對象時,它顯示「顯示生成的源文件,沒有源被附加到類'JAR文件。」。如果我附上我剛剛下載的源代碼,即「CodenameOne/CodenameOne/src」,則源代碼仍然沒有找到!如何將CodenameOne源添加到我的項目中?

我試圖清理並生成項目,但錯誤出現了:

Building jar: /home/pathTo/CodenameOneSRC/CodenameOne/CodenameOne/dist/CodenameOne.jar 
CodenameOne.jar: 
JavaSE.init: 
JavaSE.deps-jar: 
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build 
Updating property file: /home/pathTo/myProject/build/built-jar.properties 
Created dir:  /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/classes 
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/empty 
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/generated-sources/ap-source-output 
Compiling 21 source files to /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/classes 
warning: [options] bootstrap class path not set in conjunction with -source 1.7 
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:115: error: package com.jhlabs.image does not exist 
import com.jhlabs.image.GaussianFilter; 
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:8757: error: cannot find symbol 
    GaussianFilter gf = new GaussianFilter(radius); 
symbol: class GaussianFilter 
location: class JavaSEPort 
    /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:8757: error: cannot find symbol 
    GaussianFilter gf = new GaussianFilter(radius); 
symbol: class GaussianFilter location: class JavaSEPort 
Note: Some input files use or override a deprecated API. 
Note: Recompile with -Xlint:deprecation for details. 
Note: Some input files use unchecked or unsafe operations. 
Note: Recompile with -Xlint:unchecked for details. 
3 errors 
1 warning 
/home/pathTo/myProject/nbproject/build-impl.xml:914: The following error occurred while executing this line: 
/home/pathTo/myProject/nbproject/build-impl.xml:1445: The following error occurred while executing this line: 
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/nbproject/build-impl.xml:937: The following error occurred while executing this line: 
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/nbproject/build-impl.xml:269: Compile failed; see the compiler error output for details. 
BUILD FAILED (total time: 14 seconds) 

此外,該項目不能了,因爲主類是沒有找到(雖然我加入了端口/ JavaSE.jar在運行運行部分)。

我該怎麼做才能正確連接源代碼並對CN1源代碼進行更改?

讚賞任何幫助,

問候

回答

0

您需要CN1二進制代碼項目,並且需要確保JavaSE的項目負責人到該項目中的有效位置內的路徑。

E.g. GaussianFilter定義在Filters.jar之內,該項目位於該項目中。

相關問題