[SOLVED] Game Launcher programm.

Started by Yuri6037, June 15, 2013, 12:30:21

Previous topic - Next topic

Yuri6037

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 !

broumbroum

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 : 
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

Yuri6037

Can't type your code : pathSeparator is not defined !

broumbroum

its  File.class I think > File.pathSeparator

Yuri6037

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--

broumbroum

it may be of the backslash entry. try escaping the string ' " ' character only,  like add(" \" "+ ....)
check your imports. is processcommands a java.util.List ?

Yuri6037

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--

broumbroum


Yuri6037

Not very good ! Launcher doesn't work !

Yuri6037

Please, help me !
I don't know why the launcher doesn't work !

Yuri6037

Thanks for all the launcher is now 100% online ! I can now make the authenthification system.