gpt4 book ai didi

java - Eclipse-JAR 创建失败 "Class files on classpath not found or not accessible for"、 "Exported with compile warnings"和 "duplicate entry"

转载 作者:行者123 更新时间:2023-12-01 10:51:08 24 4
gpt4 key购买 nike

我从 bitbucket 下载(拉取)项目的更新代码,然后当我尝试导出可运行 JAR 文件时,出现以下错误。我尝试根据这些页面解决我的问题 1 23 。但是,我找不到任何解决方案。

我想在服务器上运行我的代码,那么我该如何解决这个问题?

我不知道如何找到 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 中时,所有重复条目错误都消失了,但仍然有其他错误。

最佳答案

Eureka !我懂了。

您的存储库中(可能)有一个损坏的文件。您需要检查 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 感到困惑。

关于java - Eclipse-JAR 创建失败 "Class files on classpath not found or not accessible for"、 "Exported with compile warnings"和 "duplicate entry",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33896487/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com