UnsatisfiedLinkError Access is denied Java Windows 10

给你一囗甜甜゛ 提交于 2020-01-17 06:02:27

问题


I have a java desktop application which uses sqlite-jdbc-3.8.10.1. On a XP machine, it works all right. I recently upgraded from Win7 to Win10. Now the following error crops up:

java.lang.UnsatisfiedLinkError: C:\Users\<user_account>\AppData\Local\Temp\sqlite-3.8.10.1-e8e7a431-c992-4fa1-b701-2e96ddd03362-sqlitejdbc.dll: Access is denied
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V
        at org.sqlite.core.NativeDB._open(Native Method)
        at org.sqlite.core.DB.open(DB.java:161)
        at org.sqlite.core.CoreConnection.open(CoreConnection.java:218)
        at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:74)
        at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:24)
        at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23)
        at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45)
        at org.sqlite.JDBC.createConnection(JDBC.java:114)
        at org.sqlite.JDBC.connect(JDBC.java:88)
.
.
.

I have tried

icacls "%APPDATA%\Local\Temp\" /grant <user_account>:(OI)(CI)F /T

which completes successfully but still no use. Btw, the account i'm logged in is an admin account.

Any ref. at the right direction will be helpful. Thank you.


回答1:


I got this Error too. For my case is the program that running the jar file is not have permission to extract the dll to the temp folder. I just use Run as Administrator Everything is fine.



来源:https://stackoverflow.com/questions/38686780/unsatisfiedlinkerror-access-is-denied-java-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!