LWJGL Forum

Programming => OpenGL => Topic started by: Yuri6037 on June 15, 2013, 12:30:21

Title: [SOLVED] Game Launcher programm.
Post by: Yuri6037 on June 15, 2013, 12:30:21
Here is my problem : Impossible to make a working a programm who will execute game with process builder ! In effect i wan't to run my game without .bat or IDE !

Here is my process builder problem and code :
I'm getting this JVM Error : "Could not find the main class C:\*************\.brickBroken\app\slick.jar. Program will exit." while trying to launch game by process builder !
Here is my java code :
processCommands represent an array list that is used by the process builder to launch game.
 --PRIVATE--

Can you help me ?
EDIT : In plus don't know why when i use "java" for "javaw" nothing happen !
Title: Re: Game Launcher programm.
Post by: broumbroum on June 15, 2013, 13:18:47
hi,
it's just because of the java runtime classpath syntax : a pathSeparator character must be interleaved between each .jar. Additionally you need enclosing strings "\\\\"" at the beginning of the classpath.
e.g : 
Code: [Select]
processCommands.add("\\\\""+Util.getWorkingDirectory() + File.separator + "app" + File.separator + "slick-util.jar" + pathSeparator);
        processCommands.add(Util.getWorkingDirectory() + File.separator + "app" + File.separator + "slick.jar" + "\\\\"");
cu
Title: Re: Game Launcher programm.
Post by: Yuri6037 on June 16, 2013, 13:05:34
Can't type your code : pathSeparator is not defined !
Title: Re: Game Launcher programm.
Post by: broumbroum on June 16, 2013, 13:08:25
its  File.class I think > File.pathSeparator
Title: Re: Game Launcher programm.
Post by: Yuri6037 on June 16, 2013, 13:14:59
pathSeparator is ok but when i add eclosing strings i get this from IntelliJ : Cannot resolve method 'add(java.lang.String, ?, java.lang.String, ?, ?, ?, java.lang.String, ?, ?, ?, java.lang.String, ?, boolean)'

Here is new code :      
--PRIVATE--
Title: Re: Game Launcher programm.
Post by: broumbroum on June 16, 2013, 13:25:10
it may be of the backslash entry. try escaping the string ' " ' character only,  like add(" \" "+ ....)
check your imports. is processcommands a java.util.List ?
Title: Re: Game Launcher programm.
Post by: Yuri6037 on June 16, 2013, 14:31:58
Yes.

EDIT : Now i have another JVM error : Could not find the main class fr.brickbroken.client.BrickBroken !
Unfortunatly, this class exists in the jar brickbroken.jar !

EDIT2 : Here is new code :
--PRIVATE--
Title: Re: Game Launcher programm.
Post by: broumbroum on June 16, 2013, 14:47:30
Good.
Title: Re: Game Launcher programm.
Post by: Yuri6037 on June 16, 2013, 17:38:06
Not very good ! Launcher doesn't work !
Title: Re: Game Launcher programm.
Post by: Yuri6037 on June 17, 2013, 08:05:34
Please, help me !
I don't know why the launcher doesn't work !
Title: Re: Game Launcher programm.
Post by: Yuri6037 on June 17, 2013, 15:04:51
Thanks for all the launcher is now 100% online ! I can now make the authenthification system.