Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I started a tutorial for java's slick 2d library, called SlickBlocks which is essentally a tetris clone. The problem is I have followed and typed in the code examples to the dot, yet when I run it I get the exception: Exception in thread "main" java.lang.RuntimeException: Resource not found: testdata/alphamap.png. I just started the tutorial and am up to "Making a cool effect with Image scale".

Any ideas?


The error has occured at:

at org.newdawn.slick.util.ResourceLoader.getResourceAsStream(
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(
at org.newdawn.slick.Image.<init>(
at org.newdawn.slick.Image.<init>(
at org.newdawn.slick.Image.<init>(
at org.newdawn.slick.Image.<init>(
at org.newdawn.slick.tests.AlphaMapTest.init(
at org.newdawn.slick.AppGameContainer.setup(
at org.newdawn.slick.AppGameContainer.start(
at org.newdawn.slick.tests.AlphaMapTest.main(

Also not that I am not using "alphamap.png" anywhere in the game, I think It is just referenced by the library itself.

share|improve this question
Can you post the piece of code where the exception occurred. – Takumi Feb 16 '12 at 9:17
@Takumi OK, I posted the code. (Or the exception really as the code where the exception occured is in the library) – Darestium Feb 16 '12 at 9:31
up vote 2 down vote accepted

it seems you're not the only with this problem :

This exception occurred because there is a missing folder "testdata" and a file "alphamap.png". This file is used by test classes of Slick. Have you downloaded the full distribution or only the library? When i download the full distribution i can find a testdata folder inside the zip file. You can find it here:

You can find a link to download the full distribution in the menu at the right of the page.

share|improve this answer
Yup, I've got the full destribution, but it seems when I add the "testdata" folder to the project it runs fine, but for some reason it is not using my code, but is using the default stuff even though the code is overriden... So what shows up are a bunch of images from that folder rotating and stuff... – Darestium Feb 16 '12 at 9:49
It seems when you run your project you're running Slick tests. I'm not very good in Java; but i've created a new project in Eclipse, added the .jar of the Slick library in my Build Path and copy/paste some code coming from the tutorial. It works well. I'm not quite sure but did you use the .jar or did you copy the source code of Slick in your project? I think you're not using .jar in order to use Slick and this will explain why tests are launched. am I wrong? – Takumi Feb 16 '12 at 10:27
Well, I imported the two jar files (slick.jar and lwjgl.jar) into my java build path. By right clicking on my project -> properties -> java build path -> libraries -> add external jars (slick.jar and lwjgl.jar). Then I set the lwjgl.jar property (when you expand the node, Native library location) to the Slick folder where the native is. – Darestium Feb 16 '12 at 21:58
Figured it out, for some reason the file which the game was set to start up from was the menu class, so I changed it to the class where the main function was located. – Darestium Feb 17 '12 at 7:38

if yow saw this pop up while you start to run your code just click your main class which contains your main method eclipse popUp

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.