kotlin-compiler-server
kotlin-compiler-server copied to clipboard
Running Kotlin server locally does not return output in text field
I simply clone this repo, compile & run it locally on localhost:8080.
When sending the same request as on your documentation page:
curl -X POST \
http://localhost:8080/api/compiler/run \
-H 'Content-Type: application/json' \
-d '{
"args": "1 2 3",
"files": [
{
"name": "File.kt",
"text": "fun main(args: Array<String>) {\n println(\"123\")\n}"
}
]
}'
The result does not contain the STDOUT which should be printed on the console. It just returns this:
{"errors":{"File.kt":[{"interval":{"start":{"line":0,"ch":9},"end":{"line":0,"ch":13}},"message":"Parameter 'args' is never used","severity":"WARNING","className":"WARNING"}]},"exception":null,"text":""}
The log of the Spring application does not show any errors.
Can somebody help?
Import add-on: this happens on my Mac. I just tried on an Ubuntu Linux where it works fine. Why is there a difference ONLY in the text returned which should contain the STDOUT?
Hi, sorry, I missed the issue =( I think the problem is due to java security policy. If you commented line it will work as expected.
btw it works on my osx