Skip to content

VSCode Extension on MacOSX - Not working with JDK 10 #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rmaclean opened this issue Jun 20, 2018 · 2 comments
Closed

VSCode Extension on MacOSX - Not working with JDK 10 #20

rmaclean opened this issue Jun 20, 2018 · 2 comments
Labels
bug Something isn't working todo This will be addressed soon

Comments

@rmaclean
Copy link

After resolving my previous issue the next error message I got was The Kotlin Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

This was resolved by changing JAVA_HOME to point to JDK 8 and not 10.

If anyone does hit this, it seems you can also change the VSCode config value java.home to point to the JDK version to use.

Logging here for 2 reasons:

  1. if someone else has this issue maybe they can find this to resolve their issues
  2. happy to try and help out with maybe declaring dependencies or something to make this more robust? not really sure where that would be - a rough pointer and I will gladly dig into it.

I worked this out by trying to run the language server manually and got this at the command prompt.

Exception in thread "main" java.lang.IllegalStateException: LOGGING: Loading modules: [java.se, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing, javafx.web, jdk.accessibility, jdk.attach, jdk.compiler, jdk.dynalink, jdk.httpserver, jdk.incubator.httpclient, jdk.jartool, jdk.javadoc, jdk.jconsole, jdk.jdi, jdk.jfr, jdk.jshell, jdk.jsobject, jdk.management, jdk.management.cmm, jdk.management.jfr, jdk.management.resource, jdk.net, jdk.packager, jdk.packager.services, jdk.scripting.nashorn, jdk.sctp, jdk.security.auth, jdk.security.jgss, jdk.unsupported, jdk.xml.dom, oracle.desktop, oracle.net, java.base, java.compiler, java.datatransfer, java.desktop, java.xml, java.instrument, java.logging, java.management, java.management.rmi, java.rmi, java.naming, java.prefs, java.scripting, java.security.jgss, java.security.sasl, java.sql, java.sql.rowset, java.xml.crypto, jdk.internal.jvmstat, jdk.management.agent, jdk.jdwp.agent, jdk.internal.ed, jdk.internal.le, jdk.internal.opt, jdk.jlink] (no MessageCollector configured)
	at org.jetbrains.kotlin.cli.jvm.compiler.ClasspathRootsResolver.report(ClasspathRootsResolver.kt:314)
	at org.jetbrains.kotlin.cli.jvm.compiler.ClasspathRootsResolver.report$default(ClasspathRootsResolver.kt:312)
	at org.jetbrains.kotlin.cli.jvm.compiler.ClasspathRootsResolver.addModularRoots(ClasspathRootsResolver.kt:254)
	at org.jetbrains.kotlin.cli.jvm.compiler.ClasspathRootsResolver.computeRoots(ClasspathRootsResolver.kt:124)
	at org.jetbrains.kotlin.cli.jvm.compiler.ClasspathRootsResolver.convertClasspathRoots(ClasspathRootsResolver.kt:79)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:233)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:117)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:413)
	at org.javacs.kt.Compiler.<init>(Compiler.kt:52)
	at org.javacs.kt.CompilerClassPath.<init>(CompilerClassPath.kt:9)
	at org.javacs.kt.KotlinLanguageServer.<init>(KotlinLanguageServer.kt:14)
	at org.javacs.kt.MainKt.main(Main.kt:8)
@fwcd fwcd added bug Something isn't working todo This will be addressed soon labels Jun 20, 2018
@fwcd
Copy link
Owner

fwcd commented Jun 20, 2018

@rmaclean The currently used Kotlin compiler probably does not support JDK 10. Switching to a newer Kotlin version in build.gradle might solve this problem.

@fwcd
Copy link
Owner

fwcd commented May 22, 2019

Java 11 support is coming in #109.

@fwcd fwcd closed this as completed May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working todo This will be addressed soon
Projects
None yet
Development

No branches or pull requests

2 participants