security - java.util.PropertyPermission when a applet error occurs -
i writing java applet implement bt streaming , kind of errors occurs.
following java error details:
java.lang.runtimeexception: java.lang.reflect.invocationtargetexception @ com.sun.deploy.uitoolkit.impl.awt.awtappletadapter.runonedtandwait(unknown source) @ com.sun.deploy.uitoolkit.impl.awt.awtappletadapter.instantiateapplet(unknown source) @ sun.plugin2.applet.plugin2manager.initappletadapter(unknown source) @ sun.plugin2.applet.plugin2manager$appletexecutionrunnable.run(unknown source) @ java.lang.thread.run(unknown source) caused by: java.lang.reflect.invocationtargetexception @ com.sun.deploy.uitoolkit.impl.awt.oldpluginawtutil.invokeandwait(unknown source) ... 5 more caused by: java.security.accesscontrolexception: access denied ("java.util.propertypermission" "user.home" "read") @ java.security.accesscontrolcontext.checkpermission(unknown source) @ java.security.accesscontroller.checkpermission(unknown source) @ java.lang.securitymanager.checkpermission(unknown source) @ sun.plugin2.applet.awtappletsecuritymanager.checkpermission(unknown source) @ java.lang.securitymanager.checkpropertyaccess(unknown source) @ java.lang.system.getproperty(unknown source) @ com.bu6ido.bitpower.common.commonutils.getsettingspath(commonutils.java:31) @ mainframe.testframe.loadsettings(testframe.java:326) @ mainframe.testframe.<init>(testframe.java:173) @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(unknown source) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(unknown source) @ java.lang.reflect.constructor.newinstance(unknown source) @ java.lang.class.newinstance(unknown source) @ com.sun.deploy.uitoolkit.impl.awt.awtappletadapter$1.run(unknown source) @ java.awt.event.invocationevent.dispatch(unknown source) @ java.awt.eventqueue.dispatcheventimpl(unknown source) @ java.awt.eventqueue.access$400(unknown source) @ java.awt.eventqueue$3.run(unknown source) @ java.awt.eventqueue$3.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.security.protectiondomain$1.dointersectionprivilege(unknown source) @ java.security.protectiondomain$1.dointersectionprivilege(unknown source) @ java.awt.eventqueue$4.run(unknown source) @ java.awt.eventqueue$4.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.security.protectiondomain$1.dointersectionprivilege(unknown source) @ java.awt.eventqueue.dispatchevent(unknown source) @ java.awt.eventdispatchthread.pumponeeventforfilters(unknown source) @ java.awt.eventdispatchthread.pumpeventsforfilter(unknown source) @ java.awt.eventdispatchthread.pumpeventsforhierarchy(unknown source) @ java.awt.eventdispatchthread.pumpevents(unknown source) @ java.awt.eventdispatchthread.pumpevents(unknown source) @ java.awt.eventdispatchthread.run(unknown source)
i did check twice java.policy
file, , make sure have:
"permission java.util.propertypermission" "user.home" "read";"
but access still denied. should avoid using user's absolute path or try set permission , register something?
Comments
Post a Comment