FileNotFoundException at codechef using Java Code

I had tried several times running programs in Codechef environment, with the same run-time error:

Exception in thread “main” java.io.FileNotFoundException: /home/lowJwm/entradaLab6.xml (No such file or directory)

How do I do to my java programs to read files (.xml, .txt, .csv) at codechef environment?

I already tried to put the file to be read in several different directories, but nothing worked.

You can’t read local files on Codechef. Take a look at this.
Files can only be read when the program has access to that directory. When you submit your code to Codechef, it has no way of accessing your directory, and thus can’t locate your file.

If you are stuck at some problem which you feel needs access to files, post that problem here, there may be some other way of solving it.

Hope this helped :slight_smile:

//