+meta = require '../package.json'
+
 # Dependencies
 {spawn} = require 'child_process'
 os = require 'os'
+
 module.exports = BridlensisCore =
   config:
     pathToJar:

    editor = atom.workspace.getActiveTextEditor()

    unless editor?
      atom.notifications.addWarning("**language-bridlensis**: No active editor", dismissable: false)
      return

    script = editor.getPath()


  getPath: (callback) ->
    if os.platform() is 'win32'
      whichCmd = spawn('where', ['java'])
    else
      whichCmd = spawn('which', ['java'])

    # Find Java
    whichCmd.stderr.on 'data', (data) ->
      atom.notifications.addError("**#{meta.name}**: Java is not in your `PATH` [environmental variable](http://superuser.com/a/284351/195953)", dismissable: true)
      return

    whichCmd.stdout.on 'data', (data) ->
      callback data
      return
