This site requires JavaScript, please enable it in your browser!
Greenfoot back
Lakorta
Lakorta wrote ...

2012/9/5

Jar doesn't find file

Lakorta Lakorta

2012/9/5

#
Hi, I have a little problem with the .jar file from my Greenfoot project. I load a file (map.dat) with "BufferedReader br = new BufferedReader(new FileReader("data/map.dat"));". It works really fine, until I compile my project to a .jar file. Then it couldn't find the map.dat. If I use the complete path /home/lakorta/greenfoot/scenarios/game/data/map.dat (Windows: C:\...\Greenfoot\scenarios\game\data\map.dat) he could load it. Please help!
You need to login to post a reply.