Hi I made a Kotlin project in Intellij. Kotlin files run just fine, however, when I create a java file I can't run it, giving me this error. Do I need to Edit Configurations for Java? I would assume you could run both..
n
nanodeath
05/05/2021, 4:41 AM
I don't think you can put a Java file in the Kotlin directory/source set
j
J6ey
05/05/2021, 6:07 AM
Hey thanks I figured. How I solved this is by creating a Java project then enabling Kotlin Java Runtime Library. Now I can add both java and kotlin files and run them!
n
nanodeath
05/05/2021, 4:00 PM
creating a src/main/java directory and activating the
java
plugin would also let you do that
👍 1
a
Andrzej
05/07/2021, 1:39 AM
I don't think you can put a Java file in the Kotlin directory/source set