The web blog strives to be a comprehensive guide to SCCD, TADDM, SERVICE NOW and MAXIMO tools. This is a personal site maintained solely by me. I intend to update it regularly.For live updates please follow us on.

5 things you need to know about Java8.

5 things you need to know about Java8

Here are the 5 things you need to know about latest edition of this marvelous language.

1. Introduction of Lambda Expressions.
Lambda Expressions let you treat functionality as a method argument, or code as data. Simply, they let us create ‘anonymous‘ functions that do not need to be bound to an identifier.

2. Introduction of Compact profiles
Sure, we all know that the Java platform is getting bigger and bigger in terms of the system classes and libraries. At last they (Oracle) recognized this and have come up with a ‘profile‘ mechanism that lets you choose a ‘compact’ profile to be used. This provides 2 important benefits:

a. It reduces the memory footprint of the application

b. It reduces the application start up time

Three profiles are introduced: compact1, compact2 and compact3. Each profile contains all APIs of all the profiles lower than itself. You invoke the javac command with the ‘-profile’ option to use the profile desired.

3. Nashorn Java Script Engine
You can invoke Nashorn in 3 ways.
a. Use Java Scripting API (javax.script) to invoke an instance of Nashorn Engine.

    ScriptEngineManager factory = new ScriptEngineManager();

    ScriptEngine engine = factory.getEngineByName(“nashorn”);

b. Use the command jrunscript

c. Use the command jjs

Note that you can use Unix Shell Scripting features for Java Script scripts with nashorn engine (How cool ?)

4. JDBC-ODBC bridge is GONE
I have no idea if folks are still using this. But it can be a disaster if you used it and you upgraded to Java 8. Move to the JDBC driver provided by the Vendor.

5. Memory Management change
PermGen (Permanent Generation is GONE). It has been replaced by MetaSpace.