當我使用應用程序引擎來開發我的應用程序,並且我只想使用代碼讀取存儲在gaevfs中的文件:this.shpAccessFile = new RandomAccessFile(this.shpFileName,「r」 );但它會拋出新的AccessControlException(「拒絕訪問」+ perm,perm);那麼有人能告訴我如何解決這個問題嗎?應用程序引擎java.security.AccessControlException
java.security.AccessControlException: access denied (java.io.FilePermission gae:\F:\workspace\GeoCloud\war\gaevfs\cecc8aa0-7405-102e-b976-026d7f000001\longrive.shp read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:203)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:98)
at com.vobject.appengine.java.io.RandomAccessFile.<init>(RandomAccessFile.java:90)
你的代碼在做什麼來實現這個目標?看起來您可能正在嘗試寫入文件--App Engine應用程序不具有對文件系統的寫入權限,只有數據存儲區和Blob存儲區。 http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox – 2011-06-07 14:38:08
我只想讀取使用代碼存儲在gaevfs中的文件:this.shpAccessFile = new RandomAccessFile(this.shpFileName,「r 「);但它會拋出新的AccessControlException(「拒絕訪問」+ perm,perm);那麼你能告訴我如何解決這個問題嗎? – lmarsxiu 2011-06-08 02:24:32