java - Runnable jar does nothing,resources not exporting -
i have created media player, when run in eclipse works fine
but when export runnable jar , try run, nothing.. may because images in resource folder not being exported while creating jar, when run using "java -jar" command jar file runs image icon not there
playicn = new imageicon("resources/play.png"); pauseicn = new imageicon("resources/pause.png"); stopicn = new imageicon("resources/stop.png");
creating icon using code.
any suggestions ??
you have use this.getclass().getclassloader().getresourceasstream('file-name')
. in eclipse take path relative class why working.
in case this.getclass().getclassloader().getresourceasstream("resource/image1.jpeg")
might help.
Comments
Post a Comment