# java security exceptions and linux/apache



## Easy Rhino (Dec 2, 2009)

i created an applet with 5 classes and everything runs just fine in windows. when i migrate everything over to ubuntu apache2 server and run the applet it gives me the following error...any ideas?


```
java.security.AccessControlException: access denied (java.io.FilePermission panda.jpg 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.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 MeatBreadCheese.<init>(MeatBreadCheese.java:41)
	at SandwichShop.init(SandwichShop.java:33)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception: java.security.AccessControlException: access denied (java.io.FilePermission panda.jpg read)
```


----------



## Kreij (Dec 2, 2009)

Looks to me like you don't have read permission set on Panda.jpg for whatever user the applet is running as.


----------



## Easy Rhino (Dec 2, 2009)

Kreij said:


> Looks to me like you don't have read permission set on Panda.jpg for whatever user the applet is running as.



yea i see that on the first line, but that doesnt make any sense to me because all of the files have regular read permissions. im going to have to keep digging on this.


----------



## Easy Rhino (Dec 2, 2009)

ok it has nothing to do with linux or the fact it is on a server now. even if i create a simple index.html doc with the proper applet code on notepad and simply open it where all the .class files are it gives me the same error. it works fine inside Eclipse tho.


----------

