小编how*_*ger的帖子

subclipse:无法加载默认SVN客户端

在使用eclispe和subclipse插件时,我经常遇到此错误:

Unable to load default SVN Client
Run Code Online (Sandbox Code Playgroud)

我已经安装了SVNKit和JavaHL提供程序,但在首选项中找不到它:

在此输入图像描述

我正在使用eclipse for win64bit

eclipse subclipse svn

67
推荐指数
6
解决办法
10万
查看次数

Eclipse Organize Imports快捷方式(Ctrl + Shift + O)不起作用

当我按Ctrl+ Shift+ 时,Eclipse用于导入丢失的包O.

在Java文件中使用时,快捷键已停止工作,但同样的快捷方式在Python文件中有效(导入缺少的包).

有关如何解决问题的任何想法.

以下是几个快照供您参考.

键绑定

在源头组织进口

python java eclipse shortcuts spring-tool-suite

33
推荐指数
4
解决办法
3万
查看次数

如何在XQuery中选择节点的属性值?

在下面的XML中:

<company>
    <customers>
    <customer cno="2222">
            <cname>Charles</cname>
            <street>123 Main St.</street>
            <city>Wichita</city>
            <zip>67226</zip>
            <phone>316-636-5555</phone>
        </customer>
        <customer cno="1000">
            <cname>Bismita</cname>
            <street>Ashford Dunwoody</street>
            <city>Wichita</city>
            <zip>67226-1555</zip>
            <phone>000-000-0000</phone>
        </customer>     
    </customers>
</company>
Run Code Online (Sandbox Code Playgroud)

我需要得到客户的否定属性.在XPath中我知道它是/company/customers/customer/@cno,在XQuery中我尝试过以下表达但是对我不起作用:

for $c in /company/customers/customer
return $c/@cno
Run Code Online (Sandbox Code Playgroud)

xml xquery

23
推荐指数
2
解决办法
5万
查看次数

Eclipse中的Spring插件无法打开pom.xml

我已经在 Eclipse 中安装了最流行的插件(Spring Tools 4.14.1),我尝试创建一个新项目并打开 pom.xml,然后它显示错误并类似于

Failed to create the part's controls

错误显示如下。为什么会出现这种情况?如何修复它?

java.lang.NoClassDefFoundError: org/eclipse/tm4e/ui/utils/ContentTypeHelper
    at org.eclipse.tm4e.languageconfiguration.LanguageConfigurationCharacterPairMatcher.findContentTypes(LanguageConfigurationCharacterPairMatcher.java:134)
    at org.eclipse.tm4e.languageconfiguration.LanguageConfigurationCharacterPairMatcher.getMatcher(LanguageConfigurationCharacterPairMatcher.java:113)
    at org.eclipse.tm4e.languageconfiguration.LanguageConfigurationCharacterPairMatcher.match(LanguageConfigurationCharacterPairMatcher.java:47)
    at org.eclipse.jface.text.source.MatchingCharacterPainter.paint(MatchingCharacterPainter.java:313)
    at org.eclipse.jface.text.PaintManager.addPainter(PaintManager.java:207)
    ...
Run Code Online (Sandbox Code Playgroud)

eclipse spring-tool-suite spring-tools-4

22
推荐指数
1
解决办法
2万
查看次数

在创建android项目时无法编写jarlist缓存文件

在Eclipse中创建一个android项目时,我收到错误:

[2014-03-13 15:14:36 - appcompat_v7] WARNING: unable to write jarlist cache file C:\Users\Neelakanteshwar\AndroidFirst\appcompat_v7\bin\jarlist.cache

appcompat_v7文件夹,在Eclipse项目文件夹一起创建.

任何人都可以帮我解决问题.

android android-appcompat

21
推荐指数
2
解决办法
5万
查看次数

具有多个匹配目标类型的 lambda 表达式的方法签名选择

我在回答一个问题时遇到了一个我无法解释的场景。考虑这个代码:

interface ConsumerOne<T> {
    void accept(T a);
}

interface CustomIterable<T> extends Iterable<T> {
    void forEach(ConsumerOne<? super T> c); //overload
}

class A {
    private static CustomIterable<A> iterable;
    private static List<A> aList;

    public static void main(String[] args) {
        iterable.forEach(a -> aList.add(a));     //ambiguous
        iterable.forEach(aList::add);            //ambiguous

        iterable.forEach((A a) -> aList.add(a)); //OK
    }
}
Run Code Online (Sandbox Code Playgroud)

我不明白为什么显式键入 lambda 的参数(A a) -> aList.add(a)会使代码编译。此外,为什么它链接到 inIterable而不是in 的重载CustomIterable
对此是否有一些解释或规范相关部分的链接?

注意:iterable.forEach((A a) -> aList.add(a));仅在CustomIterable<T>扩展时编译Iterable<T>(完全重载方法CustomIterable导致歧义错误)


在两者上都得到这个: …

java generics lambda javac ecj

13
推荐指数
1
解决办法
396
查看次数

如何在Eclipse Git远程跟踪中显示新分支?

我有一个现有的Eclipse git项目,主要和开发分支同时存在于本地和远程跟踪中.我刚刚在我的git存储库中添加了一个新分支,但我无法弄清楚如何让它在Eclipse中显示.

我试图阅读这个主题,但似乎只是希望自动显示.我发现了很多类似的问题,但它们似乎都处理了一个完全空的远程跟踪文件夹的问题,而不是我只有一个新分支缺失的问题.我已经掌握了Master和Develop.

这是不起作用的:

  • 单击Git存储库窗口中的刷新.
  • 我可以找到任何类型的同步,拉动或其他更新

这是有用的:

  • 右键单击远程跟踪文件夹,然后选择"粘贴存储库路径或URI".如果我这样做,并选择完全相同的路径,我可以看到我的新分支.此操作确实需要我将整个存储库再次完全克隆到一个空文件夹,这不可能是这样做的.
  • 我相信它可能会使用某种命令行工具,但我真的想要一个Eclipse解决方案,因为我觉得它确实存在,而我只是遗漏了一些东西.

eclipse git egit

10
推荐指数
2
解决办法
9623
查看次数

为什么assertEquals中的可选断言消息移动到Junit 5中的最后一个位置?

在JUnit 4中,可选的断言消息是assertEquals方法中的第一个参数.在JUnit 5中,它是最后一个.

是否有任何技术原因将其移至最后位置?如果是这样,哪个?

java junit unit-testing junit4 junit5

9
推荐指数
1
解决办法
459
查看次数

Eclipse Java IDE JUnit5:junit.jupiter.api.Assertions 不可访问

我对整个编程很陌生,但这是我的问题:

我过去常常通过右键单击项目来在 Eclipse 中添加 JUnit 测试用例,然后只需添加New > JUnit Test Case

目前,我无法实现任何测试方法,因为 Eclipse 在线告诉我

import static org.junit.jupiter.api.Assertions.*;
Run Code Online (Sandbox Code Playgroud)

错误信息

The type org.junit.jupiter.api.Assertions is not accessible.
Run Code Online (Sandbox Code Playgroud)

我在 IDE 中遇到的错误:

在此输入图像描述

我尝试了以下方法:

  1. 使用新的工作场所重新安装 Eclipse。
  2. 将 JUnit 添加到构建路径

没有任何帮助。

它在旧项目中工作得很好。

包资源管理器的外观如下:

在此输入图像描述

我缺少什么?

java eclipse junit testcase

8
推荐指数
1
解决办法
1万
查看次数

我无法在 Eclipse 2023-09 (4.29.0) 中运行 JUnit 5.9.x 测试

嗨,我从 start.spring.io 开始,如下所示 在此输入图像描述

我试图检查默认情况下测试是否正常。 在此输入图像描述 在此输入图像描述

但这还没有开始。我在控制台中收到此错误,而不是测试结果。

java.lang.NoSuchMethodError: 'java.util.Set org.junit.platform.engine.TestDescriptor.getAncestors()'
    at org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.getTestClassNames(StackTracePruningEngineExecutionListener.java:50)
    at org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.executionFinished(StackTracePruningEngineExecutionListener.java:39)
    at org.junit.platform.launcher.core.DelegatingEngineExecutionListener.executionFinished(DelegatingEngineExecutionListener.java:46)
    at org.junit.platform.launcher.core.OutcomeDelayingEngineExecutionListener.reportEngineFailure(OutcomeDelayingEngineExecutionListener.java:83)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:203)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:94)
    at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:52)
    at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:70)
    at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)

Run Code Online (Sandbox Code Playgroud)

我用谷歌搜索。人们说这似乎与 jupiter-api 版本有关。所以我添加了一些像这样的依赖项。但没有成功。

// build.gradle
plugins {
    id 'java'
    id 'org.springframework.boot' version '3.1.3'
    id 'io.spring.dependency-management' version '1.1.3'
}

group = 'hello'
version = '0.0.1-SNAPSHOT'

java {
    sourceCompatibility = '17'
}

repositories { …
Run Code Online (Sandbox Code Playgroud)

eclipse gradle spring-boot buildship junit5

7
推荐指数
2
解决办法
2106
查看次数