• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with Exporting to Runnable jar file.  RSS feed

 
Simon Simons
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm making simple peer to peer game. Right now I'm in phase of testing something and I wanted to move application to another PC, but when I try to export, my whole program to runnable jar file It's not working.
This is the hierarchy http://i.imgur.com/lpWjd.png
And this is the exception that I get each time I run this. Is there any simple way to make this run ?

 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simon Simons wrote:I'm making simple peer to peer game. Right now I'm in phase of testing something and I wanted to move application to another PC, but when I try to export, my whole program to runnable jar file It's not working.
This is the hierarchy http://i.imgur.com/lpWjd.png
And this is the exception that I get each time I run this. Is there any simple way to make this run ?




Did you put the library in the path? For unix, the shared library needs to be specified in the LD_LIBRARY_PATH. For windows, the DLL needs to be specified in the PATH.

Henry
 
Simon Simons
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Henry Wong: No I didn't. So basically you mean I should add lwjgl.jar to os PATH ? I'll try this.

Edit. I tried this, and It's still not working. I don't know what I'm doing wrong.
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simon Simons wrote:@Henry Wong: No I didn't. So basically you mean I should add lwjgl.jar to os PATH ? I'll try this.

Edit. I tried this, and It's still not working. I don't know what I'm doing wrong.



Assuming windows, what about the DLL? You must have done it originally? It can't work otherwise. From the error message, the jar file you used isn't pure java, so you need to add the non-java component to the PATH.

Henry
 
Simon Simons
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:

Assuming windows, what about the DLL? You must have done it originally? It can't work otherwise. From the error message, the jar file you used isn't pure java, so you need to add the non-java component to the PATH.

Henry


Sorry I didn't see the difference between .jar and .dll files. So I added to path also lwjgl.dll. And now after I try to run(java -jar game.jar), the message I get is
"Error: Unable to access jarfile game.jar". And yes, I'm working on windows.
Edit. I managed to run this with bypass, I export everything to jar. I unpacked this jar to normal directory, put lwjgl.dll and res folder there and It seems It's working.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!