Okay all. This may end up being a noob question, but I am pretty confused. I have been pouring over the tutorials getting a feel for jME structure and I was messing around with HelloTerrain.java.
Concerning this code:
URL grayScale=HelloTerrain.class.getClassLoader()
.getResource("jmetest/data/texture/bubble.jpg");
I desided to switch it up and alter the terrain a bit. I fired up photoshop, opened bubble.jpg and pasted in a chunk grayscale image i got off the usgs website. Saved it and launched HelloTerrain again.
... no change in the terrain at all. Hrm, Oddness.
So I searched my computer for any other 'bubble.jpg' and found that there are only two on my computer:
C:Documents and SettingsdaveMy DocumentsJava Workspacesjmebinjmetestdatatexturebubble.jpg
C:Documents and SettingsdaveMy DocumentsJava Workspacesjmesrcjmetestdatatexturebubble.jpg
At that point I didn't know where Eclipse was reading from, so I replaced both the bubble.jpgs with my new data. Lanuched HelloTerrain again.... still no change in the terrain at all. Oddness.
Then I up and deleted all bubble.jpgs from my computer and launched HelloTerrain one more time... without errors, launched just fine and showed the original terrain... no changes. Oddness.
I tried copying bubble.jpg to myterrain.jpg and changing the code to:
URL grayScale=HelloTerrain.class.getClassLoader()
.getResource("jmetest/data/texture/myterrain.jpg");
which results in the tutorial failing to start with the error:
SEVERE: Exception in game loop
java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(Unknown Source)
at stdGame01.HelloTerrain.complexTerrain(HelloTerrain.java:58)
at stdGame01.HelloTerrain.simpleInitGame(HelloTerrain.java:39)
at myGameStruct.MyBaseSimpleGame.initGame(MyBaseSimpleGame.java:467)
at myGameStruct.MyBaseGame.start(MyBaseGame.java:31)
at stdGame01.HelloTerrain.main(HelloTerrain.java:33)
Dec 7, 2007 11:12:43 AM myGameStruct.MyBaseSimpleGame cleanup
Lastly, in Eclipse I used Project->Clean and cleaned ALL projects. Still same behavior.
I understand that Eclipse might be caching something, but I do not understand where the tutorial is loading bubble.jpg from!
...any ideas?