What's the deference between .kt and .kts files, .jet and .jetl files?

What't the deference , and how to use them ?

Where can I find the document about them ?

Thanks!

Outersky

.jet and .jetl are deprecated, should not be used.

.kt — normal source files, .kts — script files

1 Like

But when I rename  tree.ktscript (post on the blog) to tree.kts ,  It does not work.

$ kotlinc-jvm -script tree.kts

ERROR: /Volumes/work/dev/kotlin/sample/tree.kts: (16, 20) Expecting package directive or top level declaration

exec() finished with COMPILATION_ERROR return code

Looks like a bug. Feel free to report to the tracker

Reported : KT-2958