2

I'm trying to run a java file with a users input, but I always get this error:

"Exception in thread "main" java.util.NoSuchElementException"

before the user can enter something..

I know it's normally not possible to input stuff when compiling and running a java file in Sublime Text, but does somebody knows a workaround?

Now I already have this (JavaC.sublime-build) in my Packages - Java directory from Sublime Text so I can compile and run with cmd B but input something is impossible..

{
    "cmd": ["javac \"$file_name\" && java \"$file_base_name\""],
    "shell": true,
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "selector": "source.java"
}

(I'm working on OS X)

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.