Importing assets in Eclipse, file not found

Been trying to find answers to this all day, but with no success…

I’m trying to load some custom textures with my program, but JME doesn’t seem to find them.

[java]Texture tex_floor = assetManager.loadTexture(“Textures/floorTile.png”);[/java]

returns null so the subsequent call to setTexture crashes. I’ve triplechecked the folder and file names :slight_smile:

~/workspace/HelloMonkey/assets/Textures/floorTile.png is where the file is, but I’ve also tried moving the assets folder to bin/ and src/ folders and modifying the parameter to loadTexture.


Make sure the assets folder is in your “Source Packages”.

The files have to be accessible on the classpath, thats how jME3 finds them.

Ahh, thanks! I had added assets/ as a folder to the project, but it wasn’t included in the classpath. I had also tried moving assets/ to bin/ but the solution was to skip assets entirely, and stick Textures/ in bin/


the better solution is put the assets folder in parallel to the src directory in eclipse and add this asset folder in project configuration → “Java Build Path” as additional source folder.