     if script? and scope.startsWith 'source.nsl'
       editor.save() if editor.isModified()
 
-      @getPath (stdout) ->
+      @getPath (data) ->
         nslJar  = atom.config.get('language-nsl.pathToJar')
 
         if not nslJar
           atom.notifications.addError("**language-nsl**: no valid `nsL.jar` was specified in your config", dismissable: false)
           return
 
-        defaultArguments = ["java", "-jar", nslJar]
+        defaultArguments = ["-jar", nslJar]
         customArguments = atom.config.get('language-nsl.customArguments').trim().split(" ")
 
         if os.platform() is 'win32'

        else
          customArguments.push(script)

        nslCmd = defaultArguments.concat(customArguments)

        exec nslCmd.join(" "), (error, stdout, stderr) ->
          if error isnt null
            # nslJar error from stdout, not error!
            atom.notifications.addError("**#{script}**", detail: error, dismissable: true)
          else
            atom.notifications.addSuccess("Compiled successfully", detail: stdout, dismissable: false)
    else
      # Something went wrong
      atom.beep()

  getPath: (callback) ->
    if os.platform() is 'win32'
      which  = "where"
    else
      which  = "which"

    # Find Java
    exec "\"#{which}\" java", (error, stdout, stderr) ->
      if error isnt null
        atom.notifications.addError("**language-nsl**: Java is not in your `PATH` [environmental variable](http://superuser.com/a/284351/195953)", dismissable: true)
      else
        callback stdout
      return

# Dependencies
{spawn} = require 'child_process'
os = require 'os'

module.exports = NslCore =
