Javatpoint Logo
Javatpoint Logo

Java System mapLibraryName() Method

The mapLibraryName() method of Java System Class maps a library name into platform-specific string which represents a native library.

Syntax

Parameter

libname - the name of the library.

Returns

  1. Returns a native library name which is platform-dependent.
  2. Returns NullPointerException if libname is null.

Example 1

Test it Now

Output:

map library for user's name = user.name.dll
map library for user's home = user.home.dll
map library for user's dir = user.dir.dll

Example 2

Test it Now

Output:

map library for OS's name = os.name.dll
map library for OS's architecture = os.arch.dll
map library for OS's version = os.version.dll

Next TopicJava System



Help Others, Please Share

facebook twitter pinterest