setSettingsDialogImage problems…

Hey!

Im new with this engine, and I need help with the function setSettingsDialogImage.

When I try to add a new image like this: settings.setSettingsDialogImage (“Common/MatDefs/Water/Textures/splash.jpg”), it doesn´t work :confused:

But if I change the image splash.jpg to foam.jpg instead, then it works? foam.jpg is the original image.

So, why can´t I change image that I have made?



*Error:

Exception in thread “main” com.jme3.asset.AssetNotFoundException: Common/MatDefs/Water/Textures/splash.jpg

Try add slash to your classpath resource :



settings.setSettingsDialogImage (“/Common/MatDefs/Water/Textures/splash.jpg“)

nope, doesn’t work! :confused:



All those images works, because they were there from beginning.

caustics.jpg

dudv_map.jpg

foam.jpg

foam2.jpg

foam3.jpg

gradient_map.jpg

heightmap.jpg



But if I add new images to the folder and then trying to change the background, it won’t work.

I don’t have a clue what is wrong, very strange…

Maybe you are running against prebuilt jme3 jar and not the full project ?

Or you are not pressing refresh in your IDE, so it is not copying stuff from source directories to output dir?



In any case, you should put the application image somewhere inside your application, not in jme3 - and it will solve possible classpath problems at same time.

Abies’s right, put the image in your asset folder in Textures, and us “Textures/splash.jpg” as the path