 "use strict"
 
-#!/usr/bin/env coffee
 readline = require 'readline'
 {argv} = require 'optimist'
 jvm = require '../src/jvm'

  cname = cname[0...-6] if cname[-6..] is '.class'
  jvm.run_class rs, cname, args, done_cb

read_stdin = (n_bytes, resume) ->
  process.stdin.resume()
  process.stdin.once 'data', (data) ->
    process.stdin.pause()

  rs = new RuntimeState(write_stdout, read_stdin, new BootstrapClassLoader(jvm.read_classfile))

  # create the REPL
  process.stdin.resume()
  repl = readline.createInterface process.stdin, process.stdout

  # set up handlers
  repl.on 'close', ->
