May 2, 20169 yr 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?
May 2, 20169 yr 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.
May 2, 20169 yr Author 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.
May 2, 20169 yr File myFile = new File(System.getProperty("user.home") + "/OSBot/Data/JGhost/Area/Area661830290.txt"
May 2, 20169 yr Author 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, 20169 yr by JGhost
Create an account or sign in to comment