BufferedReader reader = new BufferedReader(new FileReader(subor));
while (true)
{
String line = reader.readLine();
// If reader hit the end of file
if (line == null)
{
reader.close();
break;
}
After this method is searching in file and depend on founded charakter it load for example wall etc - not important. I've compiled it to jar file and start it home and it works. Then I've tried
to start it on 2 another computer but it doesnt work. It couldnt find the file. It says that System cannot find the file. File is in folder res . I call method wit parameter "res/level.txt". As I said it works on my pc but on the other the IOException is thrown. I've tried to copy res folder on every place in jar file of my game but it doesn't work. I dont know where is problem and I need to show it in school tomorrow so I've only a little time. Please help :(. Btw in res folder are another files like pictures and with them there is no problem (but there are loaded by another class and another way but parameter of method is same "res/filename")Maybe I've compiled it badly Iam using Eclipse fat jar plugin. Btw on every pc which I've tried it on are Windows xp with SP2 and Jre 1.6 (or jdk 1.6 for compile).











