I'm developing a JAVA robot along with the Robocode framework and WEKA. Whenever I try to check if the ".arff" file exists, it always gives me the same error.
Round 1 initializing ..
Let the games begin!
Preventing Interative_NEWVERSION.NewRobot_Interative * from access: ("java.io.FilePermission" "C: \ Users \ JoseDias \ Documents \ NetBeansProjects \ InterativePower.arff" "read"). You can only read files in your own root directory.
.Interative_NEWVERSION.NewRobot_Interative * has caused a security violation. This robot has been banned and will not be allowed to participate in battles.
Interative_NEWVERSION.NewRobot_Interative *: Exception: java.security.AccessControlException: access denied ("java.io.FilePermission" "C: \ Users \ JoseDias \ Documents \ NetBeansProjects \ InterativePower.arff" "read")
The next line is the line that I use to check whether or not the file exists in a given location.
@Override
public boolean datasetExists(String path) {
File dc = new File(path);
return dc.exists();
}
What could be the related problem?