jna-utils

The base parent for all open-source projects coming from mhoffrogge.

Лицензия

Лицензия

Категории

Категории

JNA Инструменты разработки Native
Группа

Группа

de.mhoffrogge.jna
Идентификатор

Идентификатор

jna-utils
Последняя версия

Последняя версия

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

jna-utils
The base parent for all open-source projects coming from mhoffrogge.
Организация-разработчик

Организация-разработчик

mhoffrogge

Скачать jna-utils

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/de.mhoffrogge.jna/jna-utils/ -->
<dependency>
    <groupId>de.mhoffrogge.jna</groupId>
    <artifactId>jna-utils</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/de.mhoffrogge.jna/jna-utils/
implementation 'de.mhoffrogge.jna:jna-utils:0.1.0'
// https://jarcasting.com/artifacts/de.mhoffrogge.jna/jna-utils/
implementation ("de.mhoffrogge.jna:jna-utils:0.1.0")
'de.mhoffrogge.jna:jna-utils:jar:0.1.0'
<dependency org="de.mhoffrogge.jna" name="jna-utils" rev="0.1.0">
  <artifact name="jna-utils" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.mhoffrogge.jna', module='jna-utils', version='0.1.0')
)
libraryDependencies += "de.mhoffrogge.jna" % "jna-utils" % "0.1.0"
[de.mhoffrogge.jna/jna-utils "0.1.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
net.java.dev.jna : jna-platform jar 5.3.1

Модули Проекта

Данный проект не имеет модулей.

jna-utils

Utility package for Java JNA

Purpose

This module provides methods to extract native dynamic library files bundled in a JAR on the classpath to any folder on the runtime filesystem.
A single JAR can contain dynamic libraries for multiple platforms.
This utility module will load the appropriate library based on the actual platform at runtime.

Maven

<dependency>
  <groupId>de.mhoffrogge.jna</groupId>
  <artifactId>jna-utils</artifactId>
  <version>0.1.0</version>
</dependency>

Features

  • A single JAR can contain native dynamic libraries for multiple platforms.
  • The target directory of the unpacked dynamic libraries will be prepended to the environment settings of java.library.path as well as to the OS PATH (Windows) or LD_LIBRARY_PATH (Linux) variable.
  • If the native dynamic librar(y|ies) ecplicitely loaded by your application depend on other dynamic libraries not being loaded explicitley, then those dependent libraries can be bundled as well and they will be found by the OS loader due to the previously mentioned environment variable updates
  • All dynamic libraries found in folder /<com.sun.jna.Platform.RESOURCE_PREFIX> will be extracted

Conventions

  • The bundled dynamic libraries must be located in folder /<com.sun.jna.Platform.RESOURCE_PREFIX> inside the JAR:
 /
 ├──win32-x86
 │   ├──foo_jna_loaded.dll
 │   └──foo_required.dll
 │
 └──win32-x86-64
     ├──foo_jna_loaded.dll
     └──foo_required.dll
  • The JAR to be used for extracting native dynamic libraries is determined on the classpath by passing a JARs class to the appropriate jna-utils API method.
  • If there are multiple JARs on the classpath containing the same reference class, only the first JAR found on the classpath will be used for looking up the native libraries

Limitations

  • Currently only Windows and Linux platforms supported
  • Linux not yet tested

License

This project is licensed under Apache License, Version 2.0.

Версии библиотеки

Версия
0.1.0