Encountering `libnsl.so.1` errors when launching JNLP applications on Fedora? This guide provides a quick fix for experienced Linux users to resolve the missing shared library dependency, ensuring your Java Web Start apps run smoothly.

When attempting to launch Java Web Start (JNLP) applications on recent Fedora Linux installations, experienced users may encounter a javaws execution error similar to:

javaws: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory

This issue typically arises because the libnsl (Network Services Library) package, while crucial for some legacy Java applications or specific JDK components, is no longer a default dependency or is deprecated in its traditional form on modern Linux distributions like Fedora. Consequently, a clean JDK installation might not include this library by default.

The Solution

The resolution is straightforward: explicitly install the libnsl package using DNF.

  1. Install libnsl: Execute the following command in your terminal:

    sudo dnf install libnsl
  2. Rerun Your JNLP Application: After the libnsl package is installed, retry launching your .jnlp file:

    javaws start.jnlp

    The application should now execute without the libnsl.so.1 error.

Context and Explanation

The libnsl library historically provided an interface for network services, including functionalities related to NIS (Network Information Service). While its direct role has diminished in modern system architectures, certain older applications, or specific implementations within the Java Development Kit (JDK), might still carry dependencies on it. When these applications are invoked on systems where libnsl is not present, the javaws binary (part of the JDK) fails to load due to the missing shared object. Manually installing it ensures all necessary dependencies are met for legacy Java Web Start applications to function correctly.

This fix is applicable across various Fedora versions where this dependency omission might occur, ensuring smooth operation of JNLP applications for those requiring them.