Out of Memory Error?

I'm trying to apply a texture to a loaded model and the vm throws me an out of memory error, considering the picture isn't more then 2 mb i'm not sure what could be using up all the memory so i'm assuming i'm doing something wrong. I know my coding is really whack but please save the criticism, i'm trying to just fool around with jme and get some basic things working. Thanks in advance for any help with this. Here is the error and the related code:


private void newGame() {
        //add the board to the screen
        loadModel("/resources/models/environment/board.3DS", "board");
        Spatial board = scene.getChild("board");
        board.setLocalScale(.25f);
       
        URL boardTextureLoc = this.getClass().getResource("/resources/textures/Board texture.bmp");
        TextureState ts = display.getRenderer().createTextureState();
        Texture t = TextureManager.loadTexture(boardTextureLoc, Texture.MM_LINEAR, Texture.FM_LINEAR);
        board.setRenderState(ts);
        board.updateRenderState();
        cam.lookAt(new Vector3f(0,-20,0), new Vector3f(0.0f, 1.0f, 0.0f));
        cam.update();
        board.setLocalRotation(eulerAngleToQuat(0, 0, -FastMath.PI/2));
        initPieces();
    }



and here is the error that displays:

SEVERE: Exception in game loop
java.lang.OutOfMemoryError: Java heap space
        at com.jme.image.BitmapHeader.readMap24(Unknown Source)
        at com.jme.util.TextureManager.loadBMPImage(Unknown Source)
        at com.jme.util.TextureManager.loadImage(Unknown Source)
        at com.jme.util.TextureManager.loadImage(Unknown Source)
        at com.jme.util.TextureManager.loadImage(Unknown Source)
        at com.jme.util.TextureManager.loadTexture(Unknown Source)
        at com.jme.util.TextureManager.loadTexture(Unknown Source)
        at com.jme.util.TextureManager.loadTexture(Unknown Source)
        at code.game.Chess.newGame(Chess.java:155)
        at code.game.Chess.initGame(Chess.java:139)
        at com.jme.app.BaseGame.start(Unknown Source)
        at code.game.Chess.main(Chess.java:215)

2mb on disk doesn't mean it's 2mb loaded/unpacked. what's the resolution of the image, and what's the pixel bit depth?



if it's huge you might need to up your java heap size with the vm parameter: -Xmx[your size in Mb]m … for example -Xmx512m