aspose file tools*
The moose likes Game Development and the fly likes presenting my game Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "presenting my game" Watch "presenting my game" New topic
Author

presenting my game

Tralli Lalli
Greenhorn

Joined: Nov 27, 2004
Posts: 3
Hello, my question is how to present my game created in java, I can run the game and all in textpad etc, but if I wish to send it to my friend so he can simply double click a single file and the game runs? I mean it�s no use sending him a .class file now is there?
Sean Magee
Ranch Hand

Joined: Aug 23, 2004
Posts: 69
Hi

Jar Files
Graham Renney
Greenhorn

Joined: Dec 15, 2004
Posts: 3
Hi

I am making the assumption that you are running on Windows.

There are a few java executable builders for windows: eg. EXE4J.

But realise that the strength of java is in its cross platform byte code. Creating an exe, locks your app onto a windows platform.

Also realise, that your friend will always need a JRE to run your java app - even if it is packaged as an .exe. It is very difficult to package the JVM with an app. The JVM alone is +-50MB big.


The most important of the senses is COMMON SENSE
Yasith Vidanaarachchi
Greenhorn

Joined: Sep 18, 2004
Posts: 10
Hi Trali,
You can make a .exe file with the softwere J2Exe and you can
have any icon you like too here's the link.

http://www.geocities.com/j2exe/J2Exe.zip
And you can use it on a pc that don't have java.

Yasith

[ December 20, 2004: Message edited by: yasith vidanaarachchi ]
[ December 22, 2004: Message edited by: Yasith Vidanaarachchi ]
Lahiru Abeydeera
Ranch Hand

Joined: Nov 05, 2004
Posts: 44
Create a ".Bat" file in windows or an ".sh" file on linux. (just create a notepad file and insert the code u use to run the program there and save. When it is double clicked the program will run.

Sorry I dont know how to do it on mac


lahiru
SCJP
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Originally posted by Lahiru Abeydeera:
Create a ".Bat" file in windows or an ".sh" file on linux. (just create a notepad file and insert the code u use to run the program there and save. When it is double clicked the program will run.

Sorry I dont know how to do it on mac


lahiru
SCJP

Recent versions of Mac OS are based on FreeBSD, so you can use the same .sh file as for Linux. I know this can be run from the command-line. It should also be "double-clickable", but my experience with Mac is limited and I can't say for sure.


Java API Documentation
The Java Tutorial
Nick George
Ranch Hand

Joined: Apr 04, 2004
Posts: 815
Originally posted by yasith vidanaarachchi:
Hi Trali,
You can make a .exe file with the softwere J2Exe and you can
have any icon you like too here's the link.

http://www.geocities.com/j2exe/J2Exe.zip
And you can use it on a pc that don't have java.

Yasith



Yasith, can you explain what the "working directory"?


I've heard it takes forever to grow a woman from the ground
dave taubler
Ranch Hand

Joined: May 15, 2001
Posts: 132
You can go to www.zerog.com to download their InstallAnywhere installer. It's buried pretty deep, so you need to do some searching, but they do offer a free version of their installer. It will make installers for every platform, but I pretty much find that I only need to create a Windows installer. You can specify that the installer include the Java runtime.

As for Mac OSX, you can be guaranteed that every copy ships with a Java runtime (and actually, the Java SDK for that matter.) You can't be guaranteed what version of Java the user has, but at this point, it's probably the rare OSX user that doesn't have Java 1.4+. So if you create an executable JAR, any OSX user will be able to double-click it to launch the app.

I don't think there's much of a philosophical problem with creating different installers or execution methods for different platforms, so long as the Java binary code is the same. But maybe that's just me...


Dave Taubler<br />Specializing in <a href="http://taubler.com/articles/" target="_blank" rel="nofollow">Java and Web Development</a>
Yasith Vidanaarachchi
Greenhorn

Joined: Sep 18, 2004
Posts: 10
Hi Nick,
Sorry for being late, For the question I haven't used J2Exe on any OS other than Windows

Yasith Vidanaarachchi
---------------------
SCJP 1.4
[ January 28, 2005: Message edited by: Yasith Vidanaarachchi ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: presenting my game