LWJGL
May 18, 2013, 16:53:17 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL is now using GitHub
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: starting a standalone LWJGL application via .bat or similar  (Read 813 times)
thatdude624
Newbie
*
Posts: 13


« on: November 03, 2011, 03:45:47 »

hi guys, I haven't worked on my java game for a long time, I have been a tad sideteacked with other major projects. now I am waiting for an order and have notihn to do, I remembered, I had a game. so now the game is at a point where it is almost bug-free, and I want to be able to give it to my freinds so they can make levels for it, but I cannot get the game to run outside of netbeans. this is probably very simple, but I do not know command prompt that well, or how to launch apps. here is what I tried:
Code:
java -jar "C:\magnet\game.jar" -Djava.library.path="C:\magnet\lwjgl\native\windows"
there are 2 problems with this:
1. it does not work. quite an important one.
2. the game must be located in that directory. is it possible to execute this relative to it's location?

I really do not care how it will launch, as long as it will work on windows.
sorry if this is a stupid question, but I really cannot figure it out. I greatly appreciate any help.
thanks in advance!
Logged
kappa
Administrator
Nerdus Imperius
*****
Posts: 1111



« Reply #1 on: November 03, 2011, 06:31:50 »

Have a read of the Distributing LWJGL Applications section of the LWJGL FAQ. The are a few choices mentioned there, including the option to creating just a single clickable Jar (using JarSplice) or turning your application into a single EXE file (Launch4J).

In any event, if you want to go pure batch script (.bat) way then you're probably looking for something along the lines of:

Code:
java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\jinput.jar; -Djava.library.path=native\windows org.lwjgl.test.WindowCreationTest
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!