Well, as for the second part, you can right click the java file, choose properties -> Run/Debug Settings -> [Name of run profile] -> Edit -> Arguments, then specify the arguments you want for the JVM ("-ea" in your case).

As for the first part, I'm not sure how you can do that, but for the specific example you out here (compiler compliance level), you can right click on the project and choose properties -> Java Compiler -> Enable project specific settings, and choose the compiler compliance level you want.