Kotlin recently is a fire, so want to try, of course, IntelliJ is very useful, but open a bit slow, for me this just touch kotlin small white ... (I was impatient 0.0.)
So think or try to be able to use sublime text directly compiled run, words not much to say, directly on dry:
I have already installed the Java environment by default.
1. The first step is to download kotlin-compiler-1.1.2-2.zip
Unzip it into any directory and add the bin directory to the environment variable.
Reference here: https://kotlinlang.org/docs/tutorials/command-line.html
At the command prompt, enter Kotlinc:
The environment variable setting is complete, ": Quit" exits.
2.Sublime Text under:tools-->build system-->new Build System ...
The following code:
{
"cmd": ["Kotlinc", "$file _name", "-include-runtime", "-D", "${file_base_name}.jar", "&&", "Java", "-jar" , "${file_base_name}.jar"],
"File_regex": "^ (... [^:]*]:([0-9]+):? ([0-9]+)?:? (. *) $ ",
" Working_dir ":" ${file_path} ",
" selector ":" Source. Konlin ",
" shell ": true
}
Save as Kotlinc.sublime-build file. (This file directory is in the sublime text of the Preferences-->browse Packages ... User directory)
All right. Write a HelloWorld try, ctrl+b try:
Discovery generates a Hello.jar command line to run this file directly. Use the compression software to view the file structure:
Still think St write point what test with very convenient.
PS: Small white just contact Kotlin, also ask the gods to strike a light 0.0.
Reference:
working with the Command line Compiler:
Https://kotlinlang.org/docs/tutorials/command-line.html
Sublime Text Build system--compile run Java :
Http://www.cnblogs.com/bananaplan/p/Sublime-Text-Run-Java.html