JGhost Posted May 2, 2016 Share Posted May 2, 2016 I'm getting this error when attempting to create a text file: [ERROR][05/02 09:37:33 AM]: Uncaught exception! java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Users\John\Desktop\Area\Area661830290.txt" "write") My script was working fine yesterday. The only things that have changed was updating from... jdk1.8.0_65 to jre1.8.0_91 and OSBot 2.4.53 to OSBot 2.4.58 now my script create a text file in a directory that it has many times before. does anyone know how I can fix this? Quote Link to comment Share on other sites More sharing options...
Token Posted May 2, 2016 Share Posted May 2, 2016 Read the last updates on the dev builds from .54 to .57 and .58. IO is no longer allowed outside the user.home\OSBot\Data directory. 1 Quote Link to comment Share on other sites More sharing options...
The Hero of Time Posted May 2, 2016 Share Posted May 2, 2016 i think osbot doesn't allow you to write anything outside of the osbot folder Quote Link to comment Share on other sites More sharing options...
JGhost Posted May 2, 2016 Author Share Posted May 2, 2016 Thanks for the super quick reply guys. I changed my path from C:\Users\John\Desktop\Area to C:\Users\John\OSBot\Data\Area it's working fine. 1 Quote Link to comment Share on other sites More sharing options...
Lemons Posted May 2, 2016 Share Posted May 2, 2016 File myFile = new File(System.getProperty("user.home") + "/OSBot/Data/JGhost/Area/Area661830290.txt" Quote Link to comment Share on other sites More sharing options...
JGhost Posted May 2, 2016 Author Share Posted May 2, 2016 (edited) File myFile = new File(System.getProperty("user.home") + "/OSBot/Data/JGhost/Area/Area661830290.txt" Even better! In case I needed to share my script, it wouldn't adapt well the way I current have it; using absolute path. Using System.getProperty would definitely work a lot better. Thanks for sharing Edited May 2, 2016 by JGhost Quote Link to comment Share on other sites More sharing options...