Error in .jar file


I create an executable jar, but after when I start the app an error occour…(Image)

But, when I run in eclipse, the error dont occour…Why?

Thx a lot!!!

I use this code:

private void initPlayer(){
       players = new Players(Main.class.getClassLoader().getResource("data/char/aff.jme"),

In the class player (this class load the object), I use this:

public void initPlayer(){
       String s = this.source.getFile();
         FileInputStream fis2 = new FileInputStream(s);
         JmeBinaryReader jbr = new JmeBinaryReader();

The error occour when I call the updateCollisionTree() in the class PlayerAndEquipamentController...But when run in eclipse it work nice...Why? :? :? :?

probably because when you are running from the command line you didn't set up the classpath completely and it can't find the: data/char/aff.jme and data/char/images/char_teste.jpg files.


Sorry mojo, I very noob about this. I know that is not a problem in JME, but I try many time and still dont work. In my .bat:

java -Djava.library.path="./libs/lwjgl/" -cp .;

data;libs/soeoe.jar;libs/jme/jme.jar;libs/jme/jme-awt.jar;libs/jme/jme-model.jar;libs/jme/jme-terrain.jar;libs/jme/jme-sound.jar;libs/jme/jme-effects.jar;libs/lwjgl/lwjgl.jar;libs/lwjgl/jinput.jar;libs/lwjgl/jorbis-0.0.12.jar;libs/lwjgl/jogg-0.0.5.jar;libs/lwjgl/lwjgl_fmod3.jar; main.Main

In eclipse I put the folder of my files into the project in workspace.

Thank you and sorry for my spelling!!!

if this is a line break after -cp .;  then try deleting it so that the classpath is in one line


Hi winkMan!!!

No, I put this way just a better visualisation. all is the same line…If I set all way, like:

"root/eclipse/workspace/myProject/data/char/aff.jme"…my .bat works fine…but if i get by getResource…dont works…I

I found my stupid error… :frowning:

My images and other files has been named with uppercase and I call with lowercase…

Sorry, my english cannot me explain more…Just for example:

"data/char/AFF.JME" -> "data/char/aff.jme"

Thx mojo and wink for your help!!!