Results 1 to 8 of 8
- 08-09-2007, 01:29 PM #1
Member
- Join Date
- Aug 2007
- Posts
- 7
- Rep Power
- 0
Help with error message when running JAR via HTML file
when i run my jar using html code it doesn't show anything... i checked the java console and the error i read was...
i do use imageicon and it displays properly on my gui... but when i convert to japplet it gives all sort of error. what am i doing wrongly?java.security.AccessControlException: access denied (java.io.FilePermission book0.jpg read)
at java.security.AccessControlContext.checkPermission (Unknown Source)
at java.security.AccessController.checkPermission(Unk nown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at sun.awt.SunToolkit.getImageFromHash(Unknown Source)
at sun.awt.SunToolkit.getImage(Unknown Source)
at javax.swing.ImageIcon.<init>(Unknown Source)
at javax.swing.ImageIcon.<init>(Unknown Source)
at BookMall.init(BookMall.java:63)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.security.AccessControlException: access denied (java.io.FilePermission book0.jpg read)
at java.security.AccessControlContext.checkPermission (Unknown Source)
at java.security.AccessController.checkPermission(Unk nown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at sun.awt.SunToolkit.getImageFromHash(Unknown Source)
at sun.awt.SunToolkit.getImage(Unknown Source)
at javax.swing.ImageIcon.<init>(Unknown Source)
at javax.swing.ImageIcon.<init>(Unknown Source)
at BookMall.init(BookMall.java:63)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
- 08-09-2007, 02:04 PM #2levent Guest
If book0.jpg is not on the same machine where the applet resides, you can not reach it. You just can not reach it from you applet. To access local file system of the user, you need to sign your applet..
- 08-09-2007, 04:05 PM #3
Member
- Join Date
- Aug 2007
- Posts
- 7
- Rep Power
- 0
how do i signed my applet?
- 08-09-2007, 04:15 PM #4levent Guest
Try searching on google. There are several resources to read. One of them is below:
How to sign an applet (and get it to work)
- 08-09-2007, 04:43 PM #5
Member
- Join Date
- Aug 2007
- Posts
- 7
- Rep Power
- 0
ok i signed it sucessfully... the applet is showing.. but my image is not... i'm using
what could be the problem?picture = new JLabel();
picture.setBorder(BorderFactory.createEtchedBorder (EtchedBorder.RAISED));
picture.setIcon(new ImageIcon(new ImageIcon("book0.jpg").getImage();));
getContentPane().add(picture, BorderLayout.EAST);
- 08-09-2007, 04:47 PM #6levent Guest
Getting same error?
- 08-09-2007, 04:57 PM #7
Member
- Join Date
- Aug 2007
- Posts
- 7
- Rep Power
- 0
no there is no error... the gui is showed in the Firefox now... but the picture ain't showing... and i can't look at the console.
- 08-12-2007, 03:47 PM #8
Member
- Join Date
- Aug 2007
- Posts
- 7
- Rep Power
- 0
Similar Threads
-
error while running jar file
By ernieBob in forum NetBeansReplies: 1Last Post: 03-25-2008, 11:13 AM -
java error message
By baileyr in forum New To JavaReplies: 2Last Post: 01-23-2008, 03:47 AM -
Strange error message "Source not found"
By ppayal in forum EclipseReplies: 0Last Post: 11-25-2007, 06:19 PM -
how to call a JAR FILE from HTML
By leonard in forum Java AppletsReplies: 1Last Post: 08-05-2007, 06:06 AM -
error message on jsp
By sandor in forum Web FrameworksReplies: 1Last Post: 04-11-2007, 02:10 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks