java.security.AccessControlException

Preventing sample.SittingDuck from access: (java.io.FilePermission C:\Program Files\robocode\robots\sample read): You may only read files in your own root package directory.

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web4778

  • Preventing sample.SittingDuck from access: (java.io.FilePermission C:\Program Files\robocode\robots\sample read): You may only read files in your own root package directory.
  • via Stack Overflow by Ciarán
    , 1 week ago
    Preventing itc.solomon from access: (java.io.FilePermission log.txt read): You may only read files in your own root package directory. java.security.AccessControlException: Preventing itc.solomon from access: (java.io.FilePermission log.txt read): You may only read files in your own root package directory.
  • Preventing unknown thread sample.SittingDuck (1) from access: (java.io.FilePermission C:\robocode\robots\sample\SittingDuck.data\count.dat read)
  • Stack trace

    • java.security.AccessControlException: Preventing sample.SittingDuck from access: (java.io.FilePermission C:\Program Files\robocode\robots\sample read): You may only read files in your own root package directory. at robocode.security.RobocodeSecurityManager.checkPermission(RobocodeSecurityManager.java:322) at java.lang.SecurityManager.checkRead(Unknown Source) at java.io.File.exists(Unknown Source) at java.io.Win32FileSystem.canonicalize(Unknown Source) at java.io.File.getCanonicalPath(Unknown Source) at java.io.File.getCanonicalFile(Unknown Source) at robocode.peer.robot.RobotFileSystemManager.getReadableDirectory(RobotFileSystemManager.java:120) at robocode.security.RobocodeSecurityManager.checkPermission(RobocodeSecurityManager.java:307) at java.lang.SecurityManager.checkRead(Unknown Source) at java.io.File.exists(Unknown Source) at java.io.Win32FileSystem.canonicalize(Unknown Source) at java.io.File.getCanonicalPath(Unknown Source) at java.io.File.getCanonicalFile(Unknown Source) at robocode.peer.robot.RobotFileSystemManager.getWritableDirectory(RobotFileSystemManager.java:135) at robocode.AdvancedRobot.getDataFile(AdvancedRobot.java:369) at sample.SittingDuck.run(SittingDuck.java:25) at robocode.peer.RobotPeer.run(RobotPeer.java:633) at java.lang.Thread.run(Unknown Source)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.