在“计算启动按钮工具提示"期间发生内部错误.安装 TestNG 后 Eclipse Kepler 出现 java.lang.IllegalArgumentException

在我下载 TestNG 之前,我在 Eclipse Kepler 中的项目运行良好.发布 TestNG 下载后,我无法为我的代码单击运行"按钮.单击运行后,或者即使我将鼠标悬停在运行上,也会显示以下错误消息.

<块引用>

在计算启动按钮工具提示"期间发生内部错误.java.lang.IllegalArgumentException

如果我卸载测试我的所有脚本运行.但是一旦我重新安装测试,问题就会再次出现

我尝试了以下方法:

  • 重新安装 Eclipse
  • 更改工作区
  • 重启 Eclipse
  • 创建新项目
  • 从 Eclipse Marketplace 安装 TestNg 以及通过安装新软件.

解决方案

错误说明了一切:

在计算启动按钮工具提示"期间发生内部错误.java.lang.IllegalArgumentException

根本原因

您无法为您的代码点击 Run 按钮,或者当您将鼠标悬停在 Run 上时点击 Run 后,您会看到错误,因为这些按钮的标签是根据活动编辑器中的 *.java 文件计算的.如果有两个 jar 具有相同的类,则可能会出现此问题,例如(selenium-server-standalone-3.9.1client-combined-3.9.1).p>

解决方案

所以可能的解决方案是:

  • 仅使用单个 Java Client 变体 selenium-server-standalone-3.9.1 和 client-combined-3.9.1
  • 将文件中的所有内部类(包括静态类)从private更改为default访问.
  • 从您的 IDE 清理您的 项目.
  • 使用 CCleaner 在执行 之前和之后清除所有操作系统杂务测试套件
  • 如果您需要卸载 Eclipse,请使用 Revo Uninstaller中等扫描.
  • 重新启动您的系统.
  • 执行你的测试

    您可以在这里找到关于 的详细讨论计算启动按钮工具提示"错误

My projects in Eclipse Kepler were working just fine until I downloaded TestNG. Post TestNG download, I am unable to click on Run button for my code. after I click on run or even if I hover over on run the following error message is displayed.

An internal error occurred during: "Compute launch button tooltip". java.lang.IllegalArgumentException

If I uninstall testing all my scripts run. But as soon as I reinstall Testing the issue reappears

I have tried the following methods:

  • Re-installing Eclipse
  • Changing Workspace
  • Restarting Eclipse
  • Creating new projects
  • Installing TestNg from Eclipse Marketplace as well as by Installing new software.

解决方案

The error says it all :

An internal error occurred during: "Compute launch button tooltip". java.lang.IllegalArgumentException

Root Cause

You are unable to click on Run button for your code or after you click on Run when you hover over on Run you see the error because the labels of these buttons are calculated depending on the *.java file in the active editor. This issue can occur if there are two jars with same classes e.g. (selenium-server-standalone-3.9.1 and client-combined-3.9.1).

Solution

So the possible solutions are :

  • Use only single Java Client variant either selenium-server-standalone-3.9.1 and client-combined-3.9.1
  • Change all inner classes in the file (including static ones) from private to default access.
  • Clean your Projects from your IDE.
  • Use CCleaner to wipe off all the OS chores before and after the execution of your Test Suite
  • Incase you need to uninstall Eclipse use Revo Uninstaller with Moderate scan.
  • Reboot your System.
  • Execute your Tests

    Here you can find here a detailed discussion on "Compute launch button tooltip" error

相关文章