TestIsland problem: it can't find or read the heights.raw file

Are you sure it's being copied across to the bin directory?

it seems to be a problem with the spaces in the path, i have the same problem.

But the problem is fixed by removing getFile().


new RawHeightMap(TestTerrainSplatting.class
                .getClassLoader().getResource(
                        "jmetest/data/texture/terrain/heights.raw"),
                129, RawHeightMap.FORMAT_16BITLE, false);



instead of

new RawHeightMap(TestTerrainSplatting.class
                .getClassLoader().getResource(
                        "jmetest/data/texture/terrain/heights.raw").getFile(),
                129, RawHeightMap.FORMAT_16BITLE, false);



That way the RawHeightMap constructor with a URL parameter is used.

Thanks to both of you for your answers.

I've checked the jMEbinjmetestterrain to see if it copied the .raw file but there are just the .class file.

So I've tried the second method removing the .getFile() method but It didn't work.

In the end I've put my Eclipse JME workspace in C: and as Core-Dump said, having no spaces in the path made it work!

Thanks again!

hmm did you remove getFile() in both places?  there are two places to change it.

:smiley:

Yeah Core-Dump! You are right! There are two to remove! I just removed one before but now it works!

Thanks again!