Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Kotlin server locally does not return output in text field #382

Open
Zordid opened this issue Nov 12, 2021 · 2 comments
Open

Running Kotlin server locally does not return output in text field #382

Zordid opened this issue Nov 12, 2021 · 2 comments

Comments

@Zordid
Copy link

Zordid commented Nov 12, 2021

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?

@Zordid
Copy link
Author

Zordid commented Nov 12, 2021

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?

@AlexanderPrendota
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants