Unable to Type Input with Script Package


I am trying to do Java development using Atom. With the “Script” package I attempted to run a Java class that takes input from the user using scanner. However, when I run “Script” the program does not execute. The class runs in Eclipse.


The key difference here is that Eclipse is an IDE. Packages like script have no ability to process code on their own. They rely on pointing to external command line tools to extend Atom’s capabilities. What operating system are you running and do you have the JDK installed? (It might be accessible in the Eclipse directory, or you might have to install it separately.)


I am using Mac OS. I believe I have the JDK installed.


What Script is doing is trying to call the javac terminal command, so you need to look for the JDK directory and look for javac, maybe in a directory called bin. Once you’ve found it, you can add the directory to your system path and that will allow you (and Script) to invoke the compiler with a simple javac in the command line. This article might prove useful.

I don’t have access to a Mac, so I can’t tell you exactly what to do, just what to look for. If Script isn’t working, that implies that javac isn’t in /usr/bin/ where it seems to normally be.