Fix bug when started with 'java' vs 'scala' on command line