Error: java.lang.NullPointerException when opening Java console