Problems with TestIsland

I had the same issue shortly:



IMO it has to do something with the way you import the file. You must make sure that the path is correct and don't use a complete filepath like c:documents&settingsuser… :



I give you an example: I have all *.java files in a folder called "src" and all textures (including the heightmap) in  the same folder too. Therefore you would assume you can use this code:



RawHeightMap rhm = new RawHeightMap("heightmap.raw",512);



It didn't work, although I tried many things, even a code using File = new File & .setFilename() - no way. I almost got the same message as yours -  the whole path was written correctly in the Exception but still the file was "not found"



It worked however to add the "src" folder to the path like that.



RawHeightMap rhm = new RawHeightMap("src/heightmap.raw",512);



so, if you have a folder structure like that (it doesn't need to look the same, it's just that you get the idea how it works):



JMEProject

± /src

± /bin

± /data/texture/terrain/



it might work if you use this code:



RawHeightMap rhm = new RawHeightMap("data/texture/terrain/heightmap.raw",512);



I am a beginner too and can only tell from my experience. As you see you must write down the whole subpath from your project folder in order that JME can find it. I hope it works this way.






remove the  .getFile()  part of the statement and you wont need to change the path.



To be honest i dont know why TestIsland has .getFile() in those statements,  only 1 other test also does that ( same package, not sure what the name is anymore ) and they both diddent work for me.

All the tests that dont use .getFile()  work good.



Hellmaster.

Hellmaster said:

remove the  .getFile()  part of the statement and you wont need to change the path.

To be honest i dont know why TestIsland has .getFile() in those statements,  only 1 other test also does that ( same package, not sure what the name is anymore ) and they both diddent work for me.
All the tests that dont use .getFile()  work good.

Hellmaster.


This was the solution. Thank you.