Skip to main content

Posts

Showing posts with the label JAVA 9

Why rt.jar is missing from Jdk9?

Why rt.jar is missing from Jdk9? This is one of the most common question comes to our mind when we see the JDK 9 structure. Previous to JDK 9, Java was having all classes and packages into one single jar I.e. rt.jar aka Java Runtime. Which have 1000+ classes and packages. Rt.jar helps to execute the source code. It provides native support to the application. Let’s get understand with the example if you have written a program just to add two values and print the result.   Class example { public static void main(String args){ int a= 10; int b=20; int c=a+b; System.out.print(“Result ”+c); } } For example, to execute the above program on a machine that can be a PC, mobile device, calculator powered by Java must have this rt.jar and it’s huge in size. Other than PC these devices have very limited space and memory as they are developed for some specific purpose. So Java 9 came up with a new approach that is modular Java, with this approach they break this rt.jar into nearly 100 mod...

Introduction to Project Jigsaw aka Java Platform Module System? How it is going to change the big project development?

Java 9 was a major update in the Java Platform as Java introduced Java Platform Module System, also sometimes referred to as Project Jigsaw.  Jigsaw was the internally used project name during development. Later Jigsaw changed name to Java Platform Module System ( JPMS ). Java platform is totally changed by this implementation. Now java supports module based implementation. It was a must require feature and high on demand for last couple of years as it will help the developers to manage big projects in smaller independent modules and it also going to help the developers to maintain encapsulation among the packages as well, till Java 8 java supports class level abstraction only. In JDK 9, java rt.jar is also divided into the modules java 9 have 93 modules and later on with the release of java 10 these modules are increased to 99. These modules can be found in jdk home under jmods directory as you can see in the below image. What is a Module? Modularity adds a higher level of aggrega...

Java 9 Unique features

Java 9 was initially release in September 2017, but it got some improvements in the October update later on it was final release in January 2018. Release Release date Highlights Java SE 9 2017-09-21 Initial release Java SE 9.0.1 2017-10-17 October 2017 security fixes and critical bug fixes Java SE 9.0.4 2018-01-16 Final release for JDK 9; January 2018 security fixes and critical bug fixes Java 9 Introduced an entire new structure, it is the first update that have an efficient architecture for small size devices and it was made possible due to modular structure. Java 9 introduced a new system to deal with the small devices with java modules. I have the following bunch of unique features/emhacements: 1. Java 9 REPL (JShell) : Introduced a new system to test the program using JShell. The Java Shell tool (JShell) is an interactive tool for learning the Java programming language and prototyping Java code. JShell is a Read-Evaluate-Print Loop ( REPL ), which evaluates declarations,...