Describe the bug
Trying to set up jdtls in nvim
Java works fine, but if i try to use kotlin files in java, it fails with "[ClassName] cannot be resolved to a type"
Code compiles and runs successfully, nothing wrong with it.
Considering this, jdtls should pick up kotlin files, but it does not in my case.
Currently I run jdtls with the following command:
java
-Declipse.application=org.eclipse.jdt.ls.core.id1
-Dosgi.bundles.defaultStartLevel=4
-Declipse.product=org.eclipse.jdt.ls.core.product
-Dlog.protocol=true
-Dlog.level=ALL
-Xmx1g
--add-modules=ALL-SYSTEM
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
-javaagent: /path/to/lombok
-jar /path/to/jdtls/launcher
-configuration /path/to/linux/config
-data /path/to/data/dir
Project uses groovy gradle with plugins
id 'java'
id 'org.jetbrains.kotlin.jvm' version '2.4.0-Beta2'
Does jdtls require some additional configuration for kotlin?
Or is there something else I'm doing wrong?
To Reproduce
Steps to reproduce the behavior:
- Open any dual lang project, for example this project
- Open any java file
- Use any class, defined in kotlin file
Expected behavior
Kotlin classes are recognized by jdtls
Environment
- Operating System: linux
- JDK version: OpenJDK 26.0.1
- Visual Studio Code version: -
- Java extension version: -
Describe the bug
Trying to set up jdtls in nvim
Java works fine, but if i try to use kotlin files in java, it fails with "[ClassName] cannot be resolved to a type"
Code compiles and runs successfully, nothing wrong with it.
Considering this, jdtls should pick up kotlin files, but it does not in my case.
Currently I run jdtls with the following command:
java
-Declipse.application=org.eclipse.jdt.ls.core.id1
-Dosgi.bundles.defaultStartLevel=4
-Declipse.product=org.eclipse.jdt.ls.core.product
-Dlog.protocol=true
-Dlog.level=ALL
-Xmx1g
--add-modules=ALL-SYSTEM
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
-javaagent: /path/to/lombok
-jar /path/to/jdtls/launcher
-configuration /path/to/linux/config
-data /path/to/data/dir
Project uses groovy gradle with plugins
id 'java'
id 'org.jetbrains.kotlin.jvm' version '2.4.0-Beta2'
Does jdtls require some additional configuration for kotlin?
Or is there something else I'm doing wrong?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Kotlin classes are recognized by jdtls
Environment