This is a minimal project that demonstrates Kotlin/Java interop in the Cursor IDE.
- Kotlin 2.0
- Java 21
- Maven
- A
Calculator.kt
that is meant to be called from Java main defined inJavaMain.java
and a Kotlin main defined inKotlinMain.kt
This command shows that you can call Kotlin from Java at runtime without issues ...
mvn clean compile exec:java -Dexec.mainClass=com.example.JavaMain
This command shows that you can call Kotlin from Kotlin at runtime without issues ...
mvn clean compile exec:java -Dexec.mainClass=com.example.KotlinMainKt
Open JavaMain.java
, in the Problems tab you will see The import com.example.Calculator cannot be resolved
. I have tried the following extension combinations. All exhibit the same behavior ...
- Java + Kotlin(daplf)
- Kotlin(fwcd) and Java w/ Language Support for Java
- Kotlin Language(mathiasfrohlich) and Java w/ Language Support for Java