Water Cooler v2
Water Cooler v2

Reputation: 33880

Where are the .class files?

I am really not sure if I understand what happens when you write Kotlin code. I just wrote some and I see that the build folder that Eclipse points to for my project, i.e. the bin folder of my project does not have any .class files. It just has the .kt Kotlin source files.

What does that mean? Is this language dynamically compiled? Is it interpreted? How do I set the %CLASSPATH% for my project?

Upvotes: 1

Views: 1305

Answers (1)

voddan
voddan

Reputation: 33839

Kotlin the language is in the same league as Java, and uses the same infrastructure. The code must be compiled (via a build tool plugin) and packed into a jar to be run later.

For a pure Kotlin project (without Java files) kotlinc works the same way as javac. Depending on your build system (Maven, Gradle) the .class files should be in their default location.

In InteliJ all .class files from Kotlin and Java end up after compilation in the default folder all together.

Upvotes: 3

Related Questions