eruizc-dev / jdtls-launcher

The simplest way to install and launch JDTLS
MIT License
76 stars 6 forks source link

JDTLS not working after update #18

Closed eruizc-dev closed 2 years ago

eruizc-dev commented 2 years ago

Woke up, updated some packages and JDTLS stopped working. It might or might not show an error like this:

image

Solution

Update Java to version 17. Refer to https://github.com/eclipse/eclipse.jdt.ls/commit/6d63361f80e07b5439efdbd3c8f93d6dafafadaf

Possible actions

eruizc-dev commented 2 years ago

History

  1. Jdtls doesn't run
    $ jdtls
    An error has occurred. See the log file /Users/ecarletti/.local/opt/jdtls-launcher/jdtls/config_mac/1654705614250.log
    1. Check Java version, it's 11
      $ java --version
      openjdk 11.0.11 2021-04-20
      OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
      Eclipse OpenJ9 VM AdoptOpenJDK-11.0.11+9 (build openj9-0.26.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20210421_957 (JIT enabled, AOT enabled)
    2. Update to java 17 with sdkman
      $ sdk use java 17.0.3-oracle
      Using java version 17.0.3-oracle in this shell.
    3. Check Java version to be 17
      $ java --version
      java 17.0.3 2022-04-19 LTS
      Java(TM) SE Runtime Environment (build 17.0.3+8-LTS-111)
      Java HotSpot(TM) 64-Bit Server VM (build 17.0.3+8-LTS-111, mixed mode, sharing)
    4. Run jdtls-launcher again
      
      $ jdtls
      Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
      SLF4J: Defaulting to no-operation (NOP) logger implementation
      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
      Content-Length: 125

{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"Jun 8, 2022, 1:28:26 PM Main thread is waiting"}}^C%