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


#1

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

Where can I find the document about them ?

Thanks!

Outersky


#2

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

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


#3

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


#4

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


#5

Reported : KT-2958