简体   繁体   中英

Java Security Access Control Exception?

I'm trying to build .jar file of my JavaFX project.This project run on IntellijIDEA.When I tried to build executable program of my project I'm faced with this error.

**

Application Error
General Exception
Name: sample.Main
java.security.AccessControlException:acces denied
("java.util.PropertyPermission" "user.dir" "read")

**

Details

java.security.AccessControlException: access denied ("java.util.PropertyPermission" "user.dir" "read")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at sun.plugin2.applet.FXAppletSecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at java.io.WinNTFileSystem.getUserPath(Unknown Source)
at java.io.WinNTFileSystem.resolve(Unknown Source)
at java.io.File.getAbsolutePath(Unknown Source)
at java.io.File.getAbsoluteFile(Unknown Source)
at org.sqlite.core.CoreConnection.open(CoreConnection.java:185)
at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:76)
at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:25)
at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:24)
at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45)
at org.sqlite.JDBC.createConnection(JDBC.java:114)
at org.sqlite.JDBC.connect(JDBC.java:88)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at sample.dataModel.DataSource.openDatabase(DataSource.java:98)
at sample.Main.init(Main.java:24)
at com.sun.javafx.applet.FXApplet2.init(FXApplet2.java:93)
at com.sun.deploy.uitoolkit.impl.fx.FXApplet2Adapter.init(FXApplet2Adapter.java:201)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

My Java Version is 1.8.0_181

There is my security properties

How can I handle with this problem please can anyone help me?

如果在Linux或Mac上,请尝试为您的程序提供管理员特权,如果在以adminstrator身份运行的Windows上,请为用户提供sudo特权。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM