Writing to temp dir does not work when working with SYSTEM on Win7

We have a Java application that includes components that run as SYSTEM on Windows computers. On Windows 7 x64, one component does not work when unpacking the jnidispatch library:

Exception in thread "main" java.lang.Error: Failed to create temporary file for
jnidispatch library: java.io.IOException: The system cannot find the path
specified
    at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:600)
    at com.sun.jna.Native.loadNativeLibrary(Native.java:550)
    at com.sun.jna.Native.<clinit>(Native.java:87)
    at falcon.util.vmware.VcmdTwo.loadLibraries(VcmdTwo.java:53)

Below is a snippet of comments from the Native class from the jna library:

When JNA classes are loaded, the built-in shared library (jnidispatch) is also loaded. An attempt was made to load it from the system library path using {@link System # loadLibrary}. If not found, the corresponding library will be extracted from the class path to the temporary directory and loaded from there.

, : Java jnidispatch.dll java.io.tmpdir. , java.io.tmpdir C:\Windows\system32\config\systemprofile\AppData\Local\Temp\ . , SYSTEM . DLL jnidispatch . , , .

Java JDK- , , - U7, U7, , , . .

+3
3

100% , , , , ? , , , , , .

+2

java.io.tmpdir , ?

+1

:
1. / ( ).
2. ( ).
3. .
4. / .

. jndispatch.dll .
, .

!

0

Source: https://habr.com/ru/post/1726012/


All Articles