This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 53955 - Applets that load images from their codebase can't be debugged
Summary: Applets that load images from their codebase can't be debugged
Status: CLOSED DUPLICATE of bug 51622
Alias: None
Product: obsolete
Classification: Unclassified
Component: applet (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@obsolete
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-25 12:50 UTC by foddy
Modified: 2005-07-13 15:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description foddy 2005-01-25 12:50:11 UTC
The following code raises a security exception in
an AWT applet and prevents the applet from running
in the IDE. The code works perfectly in a web
browser, and was run/debugged on previous versions
of NetBeans IDE (3.x):

buttons1=getImage(getCodeBase(),"img/nav1.jpg");

java.security.AccessControlException: access
denied (java.io.FilePermission \C:\Documents and
Settings\wreu\app-2005\build\classes\img\nav1.jpg
read)
    at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
    at
java.security.AccessController.checkPermission(AccessController.java:427)
    at
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at
java.lang.SecurityManager.checkRead(SecurityManager.java:871)
    at
sun.awt.image.URLImageSource.<init>(URLImageSource.java:37)
    at
sun.applet.AppletImageRef.reconstitute(AppletImageRef.java:33)
    at sun.misc.Ref.get(Ref.java:47)
    at
sun.applet.AppletViewer.getCachedImage(AppletViewer.java:377)
    at
sun.applet.AppletViewer.getImage(AppletViewer.java:372)
    at java.applet.Applet.getImage(Applet.java:236)
    at java.applet.Applet.getImage(Applet.java:258)
    at app.init(f1app.java:257)

This appears to be related to issue 51622, which
(in 4.0) was a similar problem with creating threads.
Comment 1 foddy 2005-01-25 12:56:46 UTC
I should add that this is in 4.1 EA 2. A work-around would be useful
as I can't wait for the beta.
Comment 2 zikmund 2005-01-26 14:42:54 UTC
It's duplicate of issue 51622.
Comment 3 zikmund 2005-01-26 15:34:52 UTC
Forgot mark as duplicate. See that issue for workaround hint.

*** This issue has been marked as a duplicate of 51622 ***