JRE 6 Compatibility

Changed JRE build dependencies to JRE 6 instead of 7. This meant
replacing casts from Object -> bool/int with Boolean/Integer, and
replacing every switch(string) statement with horrendous if/else chains.
Modified WAITUNTIL

Might be a fix to the starting/stopping problem, remains to be seen.
Read this for more details:

http://stackoverflow.com/questions/1024651/do-i-have-to-worry-about-interruptedexceptions-if-i-dont-interrupt-anything-mys/1024719#1024719
Merge pull request #1 from IanPlu/master

Syncing Ian's JRE6 compatibility & WAITUNTIL interrupt handling