运行Gradle Tasks
-> application
-> bootRun
时,许多项目中的一个开始给我以下错误:
Error: Could not find or load main class
1.1,
但是,以下两个工作:
./gradlew bootRun
Boot Dashboard
奇怪的是Gradle Task窗口的执行过程是
1.1,
类。有想法吗?
配置
尝试
./gradlew clean build
Gradle Tasks
Gradle -> Refresh Gradle Project
./metadata
并重新启动STS ./bin
和./build
目录...总是一样的结果
最佳答案
我有同样的问题。无论如何,在Eclipse Oxygen中,它突然停止工作,但是在终端中就可以了。
https://github.com/JetBrains/kotlin-native/issues/1747
也许此链接会有所帮助。它对我不起作用,但我相信它指出了正确的方向。
他目的解决方案:
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.
关于eclipse - Gradle(包装器)+ STS + Spring Boot:错误:找不到或加载主类1.1,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51290717/