Example Codes
You can get the sample codes of this book from my GitHub account, and install JDK 8, NetBeans 8.2 or 9, Glassfish v5, and play the sample codes yourself.
Get source codes
The source codes of this book is available on https://github.com/hantsy/ee8-sandbox.
Clone it into your local disk.
Install Oracle JDK 8
Get the latest Oracle Java 8, alternatively you can also get a copy of AdoptOpenJDK instead.
Follow the official installation guide to install it into your local system.
To verify the installation, open a terminal and type
java --version
, it should print java version info.
Install NetBeans IDE
At the moment I wrote down the book, there is no more IDEs support Java EE 8.
Download NetBeans from http://www.netbeans.org, NetBeans 8.2+ is required.
Install it into your local system.
NetBeans is an Apache project now, check https://netbeans.apache.org
Install Glassfish v5
Download Glassfish v5 from http://github.com/glassfish
Extract the archive into your local disc.
Open NetBeans IDE, click Services tab. If it is not opened, open it from Window menu.
Right click the Servers node, in the popup context menu, click Add Server and follow the wizard to add Glassfish v5 into your IDE.
Import sample codes
Starts up NetBeans IDE.
Click Open icon or File/Open menu to select a project. Maven projects are recognized by NetBeans IDE automatically.
Select the above cloned project, open it in NetBeans IDE, it looks like.
Click any sub project node under Modules to open the certain project, and run it on Glassfish application server by click Run in the context menu.
Last updated