Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

can not create a text file

Featured Replies

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?

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.

  • 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.

File myFile = new File(System.getProperty("user.home")  + "/OSBot/Data/JGhost/Area/Area661830290.txt"
  • 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 by JGhost

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.