Today Java 9 gets released to the public.
Create your first Java 9 project
A lot of work has been done to get better tools and to get the language better and better. It will come at a cost, and not every project will benefit from the most courageous improvements, and in particular, the following two:
- The module system
- The modular JDK
While I assume that you will want to keep your legacy projects safe, I think you will want to experiment a little bit with new projects and ‘greenfield developments’ so to speak.
Over time I created a tool that allows me to create new project templates in a fast-paced, commandline fashion. Later on I will be packaging properly, but right now it is just cloneable from GitHub.
There you have it:
I added to it a command to create a template Java 9 project that includes a structure with:
- two modules that depend on each other and compile with Maven
- shell scripts that allow you to create a custom JRE with only your projects’ modules
If you take the time to clone Fika and (of course) download the Java 9 SDK, you might want to take a look at the visual tutorial that you can play from the following page:
It is not a lazy video, it is text, you can actually copy-paste from it.