gpt4 book ai didi

java - Java Web Start 的问题

转载 作者:行者123 更新时间:2023-11-29 06:15:25 24 4
gpt4 key购买 nike

尝试通过 java web start 运行我的程序。我在输出控制台中收到以下异常。我是 Java Web Start 的新手,所以你们有什么想法吗?

仅供引用,这是第 66 行

ConfigFileReader cfg = new ConfigFileReader(BCApp.getConfigFileLocation());

java.lang.reflect.InvocationTargetException    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)    at java.lang.reflect.Method.invoke(Unknown Source)    at com.sun.javaws.Launcher.executeApplication(Unknown Source)    at com.sun.javaws.Launcher.executeMainClass(Unknown Source)    at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)    at com.sun.javaws.Launcher.run(Unknown Source)    at java.lang.Thread.run(Unknown Source)Caused by: java.lang.ExceptionInInitializerError    at JCS.Main$setStyle.setStyle(Main.java:66)    at JCS.Main.main(Main.java:57)    ... 9 moreCaused by: java.security.AccessControlException: access denied (java.util.PropertyPermission java.io.tmpdir read)    at java.security.AccessControlContext.checkPermission(Unknown Source)    at java.security.AccessController.checkPermission(Unknown Source)    at java.lang.SecurityManager.checkPermission(Unknown Source)    at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)    at java.lang.System.getProperty(Unknown Source)    at GUI.BCApp.(BCApp.java:60)    ... 11 more

最佳答案

您将要阅读 security manager .因为通过 Java Web Start 启动的代码可能会对客户端计算机造成严重危害,所以通常不允许它做很多事情。文件系统访问就是其中之一。有多种方法可以让您的 Java Web Start 应用程序访问文档中详述的文件系统。

关于java - Java Web Start 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5277655/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com