This is a little trick to turn an executable Java jar.
It works on all unixy like systems including Linux, MacOS, Cygwin, and Windows Linux subsystem.
$ ls
hello.jar
license: gpl-3.0 |
https://www.sparkfun.com/products/8688 | |
http://bildr.org/2011/06/temt6000_arduino/ | |
http://playground.arduino.cc/Interfacing/LinuxTTY | |
http://websocketd.com/ | |
http://smoothiecharts.org/ | |
-- sensor |
import com.sun.net.httpserver.HttpServer | |
import java.io.PrintWriter | |
import java.net.InetSocketAddress | |
/** | |
* Minimal embedded HTTP server in Kotlin using Java built in HttpServer | |
*/ | |
fun main(args: Array<String>) { | |
HttpServer.create(InetSocketAddress(8080), 0).apply { |