modified scripts from rtrouton's repo to fix flash and java using bash