8000 GitHub - java/lab-jdk-tools at eclipse
[go: up one dir, main page]

Skip to content

java/lab-jdk-tools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 8000  
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JDK Tools Lab

Introduction

This lab explores the latest features of the JDK tools and how to combine them in development:

  1. Understand the latest features java launcher
  2. Use javadoc tool and its type of comments
  3. Leverage jwebserver tool and SimpleFileServer API
  4. Analyze dependencies with jdeps and produce minimal runtimes with jlink.
  5. 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.

Prerequisites

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 

Working on the Lab

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.

Eclipse IDE Setup

Click to expand

Import as a General Java Project

  1. Open Eclipse.
  2. Go to File > New > Java Project.
  3. Enter the same project name (lab-jdk-tools).
  4. Uncheck "Use default location" and browse to the lab-jdk-tools project folder.
  5. Click Next and Finish.

To fix missing libraries in each module follow these steps:

  1. Right-click the project and select Properties_.
  2. Go to Java Build Path > Libraries.
  3. Click "Add External JARs..." and select JARs from the lib/ folder.
  4. Click Apply and Close.

Make sure that a src/resources/ folder from a module is recognized:

  1. Right-click resources/ > Build Path > Use as Source Folder.

Verify and Run the Project in Eclipse

Once you imported the project:

  1. Check Source Folders → src/main/java and src/resources/ are correctly recognized.
  2. Check Dependencies → JAR files from lib/ should be in the Java Build Path.

Configure Eclipse Output Folder (Optional)

By default, Eclipse compiles classes into bin/, but IntelliJ uses out/. To unify this:

  1. Right-click the module > Properties > Java Build Path.
  2. Go to "Source" tab and change "Default output folder" to out/production/<module_name>.
  3. Click Apply and Close.

Now let's get started!

About

Fast Track JDK Tools Hands-on-Lab

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0