________________________________
From: Robert Patrick <robert.patr...@oracle.com>
Sent: Monday, August 28, 2017 5:34 PM
To: Maven Users List
Subject: RE: dll hell
Since you mentioned DLLs in the subject, I assume this is Windows.
Is the %JAVA_HOME%/jre/bin directory (where jpeg.dll lives) in the PATH?
MG>%JAVA_HOME%/jre/bin is on the path and %JAVA_HOME%/jre/bin on
java.library.path
MG>
String mPath =
"C:\\Java\\JDK1.8\\jre\\bin";
String langKey = "java.library.path" ;
System.setProperty ( langKey, mPath );
MG>verified by successful System.load("JDK1.8/jre/bin/jpeg.dll")
MG>C:\MAVEN-~1\MA095B~1\APACHE~1>dir %JAVA_HOME%\jre\bin\jpeg.dll
MG> Directory of C:\Java\jdk1.8\jre\bin
MG> 05/03/2015 07:05 PM 185,768 jpeg.dll
MG> /** Sets up per-writer native structure and returns a pointer to it. */
MG> private native long initJPEGImageWriter();
MG>which causes:
MG>Caused by: java.lang.UnsatisfiedLinkError:
JPEGImageWriter.initJPEGImageWriter()J
MG>openjdk suggests re-making the jpeg.dll with USE_SYSTEM_JPEG=true directive
MG>https://marc.info/?l=openjdk-distro-pkg-dev&m=136573001932634&w=2
MG>i read somewhere that JNIEXPORT needs to be declared for each function in
the C dll for jpeg.dll
MG>At present i dont know how to to reverse engineer jpeg.dll to add JNIEXPORT
signature for these functions
MG>Which option do you suggest?
MG>Thanks Patrick
MG>Martin-
-----Original Message-----
From: Martin Gainty [mailto:mgai...@hotmail.com]
Sent: Monday, August 28, 2017 4:25 PM
To: users@maven.apache.org
Subject: dll hell
attempting to call native long initJPEGImageWriter(); in JPEGImageWriter ..when
i call initJPEGImageWriter i get:
java.lang.UnsatisfiedLinkError: JPEGImageWriter.initJPEGImageWriter()
ive read System.loadLibrary("jpeg") in static initialiser is "supposed to load"
jpeg library:
static {
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Void>()
{
public Void run() {
System.loadLibrary("jpeg");
} //end run
}); //end doPrivileged/PrivilegedAction } //end static
is supposed to load library but
when i call initJPEGImageWriter i get
java.lang.UnsatisfiedLinkError: JPEGImageWriter.initJPEGImageWriter()
advice appreciated
Martin
______________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org