Gradle (wrapper) + STS + Spring Boot: Error: Could not find or load main class 1.1,

Gradle (wrapper) + STS + Spring Boot: Error: Could not find or load main class 1.1,

当 运行 Gradle Tasks -> application -> bootRun:

时,许多项目中的一个开始给我以下错误

Error: Could not find or load main class 1.1,

但是,以下两种方法都有效:

奇怪的是 Gradle 任务 window 的执行与 class 1.1,.

想法?

配置

尝试次数

...总是相同的结果

我也有同样的问题。无论如何,在 Eclipse Oxygen 中它突然停止工作,但在终端中它很好。

https://github.com/JetBrains/kotlin-native/issues/1747

也许这个 link 会有所帮助。它对我不起作用,但我相信它指向了正确的方向。

他的解决方案:

No, removing of node does not help. But the follow line in the Gradle script solve the problem:

System.getProperties().remove( 'org.osgi.framework.system.capabilities' )

The value of the property is:

osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0, 1.1, 1.2",osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0, 1.1",osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8",osgi.ee; osgi.ee="JavaSE/compact1"; version:List<Version>="1.8",osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8",osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8"

It look like that you try to add all environment variable to the command line but does not quote correctly.