void () { try { JavaParameters javaParameters = new JavaParameters(); javaParameters.setJdk(getProjectJDK()); javaParameters.toCommandLine(); fail("'main class missing' expected"); } catch (CantRunException e) { assertEquals(ExecutionBundle.message("main.class.is.not.specified.error.message"), e.getMessage()); } }