.KTS 文件扩展名

Kotlin Script

开发者 JetBrains
受欢迎程度
3.0  |  1 
 

什么是 KTS 文件?

A KTS file is a script written in the Kotlin programming language. It contains executable Kotlin source code. KTS files can be opened and edited in any text editor, and they can be executed using the Kotlin compiler (kotlinc).

更多信息

在 Microsoft Visual Studio Code 中打开的 .kts 文件截图
在 Microsoft Visual Studio Code 中打开的 KTS 文件

Kotlin is a statically-typed programming language developed by JetBrains. JetBrains developed the Kotlin language to alleviate some of the common issues that arise in Java development. Most popularly, Kotlin is used to develop Android applications, as it is Google's preferred Android development language.

Developers creating Kotlin programs can create and include Kotlin scripts in those programs. These scripts are saved as KTS files. In addition to being referenced and run within Kotlin programs, developers can run KTS files independently. To run a script using the Kotlin compiler, a developer can use the command kotlinc -script filename.kts. Otherwise, the developer can run their script from within Jetbrains IntelliJ IDEA or Google Android Studio.

注: Kotlin source code files that do not contain a Kotlin script are saved as .KT files.

如何打开 KTS 文件

You can open a KTS file in any text or source code editor. However, it is best to open a KTS file in Jetbrains IntelliJ IDEA (cross-platform) or Google Android Studio (cross-platform). These programs display KTS files' syntax correctly, and they also allow you to run the script a KTS file contains.

使用File Viewer Plus打开 400 多种文件格式。免费下载

可打开或引用 KTS 文件的程序

分类: 开发者
更新时间: 2021-09-14

验证者 FileInfo.com

FileInfo.com 团队 独立研究了本页面列出的 Kotlin Script 文件格式和 Mac, Windows, and Linux 应用。 我们的目标是达到 100% 的准确率,并且仅发布我们已验证过的文件类型信息。

如果您想为此页面提出新增或更新建议,请告诉我们