2015-11-24 17 views
0

我從bitbucket下載(拉)我項目的更新代碼,然後嘗試導出一個Runnable JAR文件,我得到了以下錯誤。我嘗試根據這些頁面123解決我的問題。但是,我找不到任何解決方案。Eclipse-JAR創建失敗「找不到或不能訪問類路徑上的類文件」,「導出時出現編譯警告」和「重複條目」

我想在服務器上運行我的代碼,所以如何解決此問題?

我不知道如何找到LICENSE.txt文件和其他重複文件的重複。

JAR creation failed. See details for additional information. 
Exported with compile warnings: Indexing/src/definedObjTypes/TypePosting.java 
Exported with compile warnings: Indexing/src/input/ConvertTypeIndexToSequence.java 
Class files on classpath not found or not accessible for: 'Indexing/src/input/TestInput.java' 
Exported with compile warnings: Indexing/src/input/MainInput.java 
Exported with compile warnings: Indexing/src/logicLayer/TreapMain.java 
Exported with compile warnings: Indexing/src/logicLayer/TestQueryProcess.java 
Exported with compile warnings: Indexing/src/logicLayer/EntityIndex.java 
Exported with compile warnings: Indexing/src/logicLayer/WaveletTreeMain.java 
Exported with compile warnings: Indexing/src/logicLayer/QueryProcess.java 
Exported with compile warnings: Indexing/src/logicLayer/ReCreatePostingList.java 
Exported with compile warnings: Indexing/src/logicLayer/Main.java 
Exported with compile warnings: Indexing/src/logicLayer/TestSearchResult.java 
Exported with compile warnings: Indexing/src/waveletTree/WaveletTreeUtilities.java 
Exported with compile warnings: Indexing/src/waveletTree/WaveletTreeSeq.java 
Exported with compile warnings: Indexing/src/waveletTree/Mapper.java 
Exported with compile warnings: Indexing/src/waveletTree/Main.java 
Exported with compile warnings: Indexing/src/waveletTree/WaveletTree.java 
Exported with compile warnings: Indexing/src/waveletTree/WTNode.java 
duplicate entry: about.html 
duplicate entry: about.html 
duplicate entry: plugin.properties 
duplicate entry: plugin.properties 

當我選擇包所需的庫到生成JAR而不是提取所需的庫到生成JAR所有重複錄入錯誤都消失了,但我仍然有其他錯誤。

+1

我幫不了你。但是你可能應該考慮一些像Maven,Ant等構建工具。設置它並不難。 –

回答

1

尤里卡!我懂了。

您(可能)在您的存儲庫中存在損壞的文件。您需要檢查「式的聲明」,上面寫着你的TestInput.java文件的一部分:

import java.[blah] 

public class MyJavaClass 
{ 
// class code 

,並確保Java的文件沒有任何缺失或畸形的類型聲明:

import java.[blah] 

// I accidentally deleted my type declaration here 
{ 
// class code 

如果你這樣做,你將無法導出任何東西。 Eclipse也許正在尋找具有類型聲明的文件來了解要編譯的內容。刪除它,但保留名稱的方式,並位於一個源文件夾,混淆了Eclipse。

相關問題