This lab explores the latest features of the JDK tools and how to combine them in development:
- Understand the latest features java launcher
- Use javadoc tool and its type of comments
- Leverage jwebserver tool and
SimpleFileServer
API - Analyze dependencies with jdeps and produce minimal runtimes with jlink.
- Utilize jfr commands to monitor your application.
Each part is implemented in its own module, so that you can follow one or the other, independently.
- JDK 23 minimum installed and configured. If you do not have it installed, please obtain one from https://jdk.java.net/23/ and follow JDK setup steps from here https://dev.java/learn/getting-started/#setting-up-jdk. Check your Java version setup with:
java -version
- Use your favorite IDE (like IntelliJ or Eclipse) or a code editor like VS Code.
- (Optional for
jlink
integration step) Docker CLI running on your machine. Check that by running the following command in a terminal window:
docker version
Start by cloning the code from this repo:
git clone https://github.com/java/lab-jdk-tools.git
git checkout eclipse
Each module contains its own README.md
file, with the instructions and hints on how to work on the different parts of the lab. They are all independent, so you can choose the one you want to work on.
The project was generated with IntelliJ's build system, but below are additional steps in case you decide to use a different code editor.
Click to expand
- Open Eclipse.
- Go to File > New > Java Project.
- Enter the same project name (
lab-jdk-tools
). - Uncheck "Use default location" and browse to the
lab-jdk-tools
project folder. - Click Next and Finish.
To fix missing libraries in each module follow these steps:
- Right-click the project and select Properties_.
- Go to Java Build Path > Libraries.
- Click "Add External JARs..." and select JARs from the lib/ folder.
- Click Apply and Close.
Make sure that a src/resources/ folder from a module is recognized:
- Right-click resources/ > Build Path > Use as Source Folder.
Once you imported the project:
- Check Source Folders → src/main/java and src/resources/ are correctly recognized.
- Check Dependencies → JAR files from lib/ should be in the Java Build Path.
By default, Eclipse compiles classes into bin/, but IntelliJ uses out/. To unify this:
- Right-click the module > Properties > Java Build Path.
- Go to "Source" tab and change "Default output folder" to out/production/<module_name>.
- Click Apply and Close.
Now let's get started!