Making a runnable file

Hi

I created a game, and i want to make a .exe file out of the porject , so the user will just click it and it will work (assuming he has a java platform on his computer...)

i tried to work with exe4j , but i had some problems with the jar files - i just don't know how to work with them

can someone please tell me how to do this?

[363 byte] By [sariel86] at [2007-9-30 11:46:36]
# 1
if it's for windows, try this: http://www.rolemaker.dk/nonRoleMaker/javalauncher/marner_java_launcher.htm
Andy_Harper at 2007-7-4 13:22:23 > top of Java-index,Other Topics,Java Game Development...
# 2
If you expect the users to have a JRE loaded, then just make executable JAR files.
morgalr at 2007-7-4 13:22:24 > top of Java-index,Other Topics,Java Game Development...
# 3
executable JAR files:in META-INF/MANIFEST.mf add the entryClass-Path=com.mydomain.MyMainClassusing your full class name of your main class
geoffrey3 at 2007-7-4 13:22:24 > top of Java-index,Other Topics,Java Game Development...
# 4
Class-Path should be Main-Class
geoffrey3 at 2007-7-4 13:22:24 > top of Java-index,Other Topics,Java Game Development...
# 5

Two simple options:

1) Use Web Start and create shortcuts.

2) Create bat file with simple exe to run the bat fle

/**

* C++ file to run bat

*/

#include <windows.h>

#include <string>

using namespace std;

int main(int argc, char* argv[]) {

system("bin\\MyGame.bat");

return 0;

}

REM - MyGame.bat

REM - Bat file to run jar

@echo off

TITLE Game Loader

SET CLASSPATH=myGame.jar;

start javaw myprojects.GameMain

EXIT

tymer99 at 2007-7-4 13:22:24 > top of Java-index,Other Topics,Java Game Development...