Hi, i have create a game call Ninjabomb.The game we work fine in compiler but when i compile into .jar, only empty jframe appears.Here i attach my image code
import java.awt.Component; import java.awt.MediaTracker; import java.awt.image.BufferedImage; public class roleImageArray { MediaTracker _mt; BufferedImage _back[]; BufferedImage _fire[]; BufferedImage _play[]; BufferedImage _playStart; BufferedImage _foemans[]; BufferedImage _end[]; BufferedImage _foemansNow; BufferedImage _bonus[]; BufferedImage _bom; BufferedImage _bomb; BufferedImage _ray; BufferedImage _charred; BufferedImage _greatman; BufferedImage _greatman_bomb; public roleImageArray(Component canvas) { _back = new BufferedImage[6]; _fire = new BufferedImage[5]; _play = new BufferedImage[6]; _foemans = new BufferedImage[20]; _bonus = new BufferedImage[3]; _bonus[0] = ImageUtils.loadImage("item_fire.png"); _bonus[1] = ImageUtils.loadImage("item_bomb.png"); _bonus[2] = ImageUtils.loadImage("item_greatman.png"); _end = new BufferedImage[2]; _end[0] = ImageUtils.loadImage("win.jpg"); _end[1] = ImageUtils.loadImage("gameover.jpg"); _back[0] = ImageUtils.loadImage("rock.png"); _back[1] = ImageUtils.loadImage("wall.png"); for (int i = 0; i < _fire.length; i++) { _fire[i] = ImageUtils.loadImage("fire.png"); } _play[0] = ImageUtils.loadImage("player0.png"); _play[1] = ImageUtils.loadImage("player1.png"); _play[2] = ImageUtils.loadImage("player2.png"); _play[3] = ImageUtils.loadImage("player3.png"); _play[4] = ImageUtils.loadImage("player4.png"); _play[5] = ImageUtils.loadImage("player5.png"); _greatman = ImageUtils.loadImage("greatman.png"); _greatman_bomb = ImageUtils.loadImage("greatman_bomb.png"); _foemans[0] = ImageUtils.loadImage("beast0.png"); _foemans[1] = ImageUtils.loadImage("beast1.png"); _foemans[2] = ImageUtils.loadImage("beast2.png"); _foemans[3] = ImageUtils.loadImage("beast3.png"); _foemans[4] = ImageUtils.loadImage("beast4.png"); _foemans[5] = ImageUtils.loadImage("beast5.png"); _foemans[6] = ImageUtils.loadImage("beast6.png"); _foemans[7] = ImageUtils.loadImage("beast7.png"); _foemans[9] = ImageUtils.loadImage("beast9.png"); _foemans[8] = ImageUtils.loadImage("beast8.png"); _foemans[10] = ImageUtils.loadImage("beast10.png"); _foemans[11] = ImageUtils.loadImage("beast11.png"); _foemans[12] = ImageUtils.loadImage("beast12.png"); _foemans[13] = ImageUtils.loadImage("beast13.png"); _foemans[14] = ImageUtils.loadImage("beast14.png"); // _foemans[12] = ImageUtils.loadImage("beast12.png"); _bom = ImageUtils.loadImage("boom.png"); _bomb = ImageUtils.loadImage("bomb.png"); _ray = ImageUtils.loadImage("ray.png"); _charred = ImageUtils.loadImage("charred.png"); _mt = new MediaTracker(canvas); _mt.addImage(_end[0], 1); _mt.addImage(_end[1], 1); _mt.addImage(_back[0], 1); _mt.addImage(_back[1], 1); _mt.addImage(_playStart, 1); _mt.addImage(_foemans[1], 1); _mt.addImage(_bom, 1); _mt.addImage(_bomb, 1); } public BufferedImage[] getEnd() { return _end; } public BufferedImage[] getBack() { return _back; } public void setBack(BufferedImage[] back) { this._back = back; } public BufferedImage getBomb() { return _bomb; } public BufferedImage getRay() { return _ray; } public BufferedImage getCharred() { return _charred; } public void setBakuha(BufferedImage bomb) { this._bomb = bomb; } public BufferedImage getBom() { return _bom; } public void setBom(BufferedImage bom) { _bom = bom; } public BufferedImage[] getFire() { return _fire; } public BufferedImage getGreatman() { return _greatman; } public BufferedImage getGreatman_bomb() { return _greatman_bomb; } public void setFire(BufferedImage[] fire) { this._fire = fire; } public BufferedImage[] getBonus() { return _bonus; } public void setBonus(BufferedImage[] bonus) { _bonus = bonus; } public BufferedImage[] getFoemans() { return _foemans; } public void setFoemans(BufferedImage[] foemans) { this._foemans = foemans; } public BufferedImage getFoemansNow() { return _foemansNow; } public void setFoemansNow(BufferedImage foemansNow) { this._foemansNow = foemansNow; } public MediaTracker getMt() { return _mt; } public void setMt(MediaTracker mt) { this._mt = mt; } public BufferedImage[] getPlay() { return _play; } public void setPlay(BufferedImage[] play) { this._play = play; } public BufferedImage getPlayStart() { return _playStart; } public void setPlayStart(BufferedImage playStart) { this._playStart = playStart; } }