用于Eclipse问题的Kotlin插件

时间:2018-12-15 21:00:08

标签: eclipse kotlin

使用Eclipse进行Kotlin开发是否成功?如果是这样,请告知您使用的Eclipse,JVM和Kotlin插件版本

我尝试了以下组合,但仅取得了非常有限的成功:

  • Eclipse 2018-12 RC1(buildId = 4.10.0.I20181129-0330)
  • JVM(11.0.1)
  • Kotlin插件(0.8.11.v20181207-0928)

Eclipse似乎可以在JVM 11上正常运行,但是Kotlin插件在创建新的Kotlin项目时会出错:

Errors occurred during the build.
Errors running builder 'KotlinBuilder' on project 'KotTest'.
org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor

谢谢

Eclipse日志:

!ENTRY org.eclipse.core.resources 4 75 2018-12-15 15:46:27.368
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.jetbrains.kotlin.ui 4 75 2018-12-15 15:46:27.368
!MESSAGE Errors running builder 'KotlinBuilder' on project 'KotTest'.
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:279)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:703)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:626)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:594)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:574)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:553)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:331)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)

...

2 个答案:

答案 0 :(得分:1)

我有同样的问题,看来Kotlin Eclipse插件破坏了Eclipse 2018/12的JDT 我不得不恢复到Eclipse 2018/09才能使我的工作空间再次工作

答案 1 :(得分:0)

{eclipse} /plugins/org.eclipse.jdt.ui_ {version}中存在找不到的类,因此这似乎是Kotlin构建器未正确设置类路径的问题。到目前为止,我还没有找到一种方法来定制构建器用来解决此问题的类路径。

a ticket opened on their bug tracker about this