• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

jlink: command not found

by admin

A new tool, called jlink was introduced in Java 9 that enables the creation of modular runtime images. These runtime images are nothing but a collection of a set of modules and their dependencies. A Java enhancement proposal, JEP 220, governs the structure of this runtime image.

The JLink tool is designed to provide optional phases between compile time and runtime, called link time, which links a set of modules and its transitive dependencies to create runtime images. JLink makes deployment simpler and also reduces the size of an application.

The invocation syntax of jLink is as follows:

jlink --module-path [modulepath] --add-modules [modules] --limit-modules [modules] --output [path]

Here,
–module-path – jLink use module path for finding modules such as modular jars, JMOD files
–add-modules – Mention module which needs to include in default set of modules for run time image, by default set of modules in empty.
–limit-modules – Use this option to limits modules, which is required for our application.
–output – Final resulting run-time image will be stored in output directory
–help – list details about jLink options
–version – show the version number

If you get the below error while running the jlink command:

jlink: command not found

you may install the below package as per your choice of distribution.

Distribution Command
Debian apt-get install openjdk-12-jdk-headless
Ubuntu apt-get install openjdk-9-jdk-headless
Arch Linux pacman -S jdk10-openjdk
Kali Linux apt-get install openjdk-11-jdk-headless
Fedora dnf install java-9-openjdk-devel-debug-1
Raspbian apt-get install openjdk-9-jdk-headless

Conclusion

A new tool in JDK 9 is the jlink command—Java’s linker for creating custom runtime images. You can include just what’s necessary for a given app or set of apps to execute in a custom runtime. For example, if you’re creating a runtime for a device that does not support GUIs, you can create a runtime without the corresponding modules that support Swing and JavaFX.

Filed Under: Java, Linux

Some more articles you might also be interested in …

  1. How To Use distro-sync Option With dnf To Upgrade OS (CentOS/RHEL 8)
  2. mcookie: command not found
  3. How to monitor /etc/shadow and /etc/passwd file for changes with Auditd?
  4. Honeypot Tutorials – Modes and Working of Honeypot
  5. What are SELinux Modes and how to set them
  6. How to Mask or Unmask a Service in CentOS/RHEL 7 and 8
  7. xfs_admin: command not found
  8. Using cut on Linux Terminal
  9. “Could not resolve proxy: https; Unknown error” – error with ‘yum update’
  10. CentOS / RHEL : How to change SNMP community string

You May Also Like

Primary Sidebar

Recent Posts

  • raw: command not found
  • raw Command Examples in Linux
  • rankmirrors Command Examples in Linux
  • radeontop: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright