diff --git a/pom.xml b/pom.xml index a62e257..3e169f6 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ usb4java jar usb4java - 1.3.0 + 1.3.1-SNAPSHOT http://usb4java.org/ USB library for Java based on libusb and implementing javax-usb (JSR-80). @@ -60,14 +60,14 @@ UTF-8 - 1.3.0 + 1.3.1-SNAPSHOT scm:git:git://github.com/usb4java/${project.artifactId}.git scm:git:ssh://git@github.com/usb4java/${project.artifactId}.git http://github.com/usb4java/${project.artifactId} - usb4java-1.3.0 + HEAD diff --git a/src/main/java/org/usb4java/Loader.java b/src/main/java/org/usb4java/Loader.java index 3706e44..8d8339a 100644 --- a/src/main/java/org/usb4java/Loader.java +++ b/src/main/java/org/usb4java/Loader.java @@ -300,6 +300,11 @@ private static String extractLibrary(final String platform, * times. Duplicate calls are ignored. This method is automatically called * when the {@link LibUsb} class is loaded. When you need to do it earlier * (To catch exceptions for example) then simply call this method manually. + *

+ * If the system property org.usb4java.LibraryName is defined, then + * instead of going through the classpath looking for the appropriate DLL, + * extracting it, etc., we simply call {@link System#loadLibrary}, passing + * in the value of the property. * * @throws LoaderException * When loading the native wrapper libraries failed. @@ -313,13 +318,21 @@ public static synchronized void load() } loaded = true; - final String platform = getPlatform(); - final String lib = getLibName(); - final String extraLib = getExtraLibName(); - if (extraLib != null) + final String libraryName = System.getProperty("org.usb4java.LibraryName"); + if (libraryName != null) { - System.load(extractLibrary(platform, extraLib)); + System.loadLibrary(libraryName); + } + else + { + final String platform = getPlatform(); + final String lib = getLibName(); + final String extraLib = getExtraLibName(); + if (extraLib != null) + { + System.load(extractLibrary(platform, extraLib)); + } + System.load(extractLibrary(platform, lib)); } - System.load(extractLibrary(platform, lib)); } } diff --git a/src/site/apt/faq.apt.vm b/src/site/apt/faq.apt.vm index 5bd958e..620d3d7 100644 --- a/src/site/apt/faq.apt.vm +++ b/src/site/apt/faq.apt.vm @@ -24,7 +24,7 @@ Frequently asked questions ---- This means that whenever a USB device with vendor id <0x89ab> and product id - <0x4567> is attached then the group is permitted to + <0x4567> is attached then the group is permitted to write to the device. So make sure your user is in that group (or use a different group). pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy