What is the purpose of the default keyword in Java?

It’s a new feature in Java 8 which allows an interface to provide an implementation. Described in Java 8 JLS-13.5.6. Interface Method Declarations which reads (in part) Adding a default method, or changing a method from abstract to default, does not break compatibility with pre-existing binaries, but may cause an IncompatibleClassChangeError if a pre-existing binary attempts to invoke the method. This error occurs if the qualifying … Read more

Should I set a MaxMetaspaceSize?

As I commented on the previous answer the reasons for setting a limit on those memory pools is different. If your users previously increased the MaxPermSize above the default that probably was either to avoid Full GCs / concurrent mode failures with CMS or because their applications genuinely needed a lot of perm gen space. … Read more

Tomcat 8 Maven Plugin for Java 8

Yes you can, In your pom.xml, add the tomcat plugin. (You can use this for both Tomcat 7 and 8): pom.xml tomcat-users.xml settings.xml (maven > conf) *** deploy/re-deploy** mvn tomcat7:deploy OR mvn tomcat7:redeploy Tried this on (Both Ubuntu and Windows 8/10): Jdk 7 & Tomcat 7 Jdk 7 & Tomcat 8 Jdk 8 & Tomcat 7 Jdk 8 & … Read more

Error:java: javacTask: source release 8 requires target release 1.8

Go to File > Settings > Build, Execution, Deployment > Compiler > Java Compiler If on a Mac, it’s under Intellij IDEA > Preferences… > Build, Execution, Deployment > Java Compiler Change Target bytecode version to 1.8 of the module that you are working for. If you are using Maven Add the compiler plugin to pom.xml under the top-level project node: (Hoisted from the comments.) Note: … Read more