cborders
|
 |
«
Posted
2005-09-16 17:31:26 » |
|
This may be a completely stupid question, but here it goes... How does one create an executable from Java? I noticed that Tribal Troubles had different versions for each system. How? Is there a "compier" or something?
|
|
|
|
|
bauerr
Junior Member  
Java!!!!!!!!!!! !!!
|
 |
«
Reply #1 - Posted
2005-09-16 20:17:29 » |
|
You mean an .exe file to start your programm in Windows? Just google with "java + exe" and you may find some helpful links. This should also be possible for other OS. But I wouldn't use them. 1. Normally you need do distribute an DLL that contains all classes. So it would be really big. 2. This will limit your programm to a special OS. In my opinion a java program should be able to run everywhere. 
|
|
|
|
|
cborders
|
 |
«
Reply #2 - Posted
2005-09-16 20:31:04 » |
|
What prompted this question was Oddlabs Tribal Trouble. It's a very professional looking game, right down to the distribution and I was hoping that someone could cast some light on how that was accomplished.
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
f.l.x
|
 |
«
Reply #3 - Posted
2005-09-16 20:46:24 » |
|
you can allways hack a little c and code a launcher.
|
|
|
|
cborders
|
 |
«
Reply #4 - Posted
2005-09-16 20:56:27 » |
|
True! I'll look into that! Thanks!
|
|
|
|
|
|
|
arne
Senior Member   
money is the worst drug- we should not let it rule
|
 |
«
Reply #6 - Posted
2005-09-17 22:28:33 » |
|
you can allways hack a little c and code a launcher.
a .bat (Windows) and .sh (Linux) would do the job also.
|
|
|
|
cborders
|
 |
«
Reply #7 - Posted
2005-09-18 05:36:50 » |
|
Wow! JSmooth looks pretty sweet! I have been using bat's, but I just think exe's look more professional.
|
|
|
|
|
blahblahblahh
|
 |
«
Reply #8 - Posted
2005-09-18 18:47:36 » |
|
Wow! JSmooth looks pretty sweet! I have been using bat's, but I just think exe's look more professional.
JAR's look better than both. Webstart looks better than JAR's.
|
malloc will be first against the wall when the revolution comes...
|
|
|
kappa
|
 |
«
Reply #9 - Posted
2005-09-19 00:34:46 » |
|
too often i've had the problem with jar's i send it too my friend, when he clicks it his zip program opens it up! very difficult to get working from there, any way jnlp webstart is really good though!
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Herkules
|
 |
«
Reply #10 - Posted
2005-09-19 23:46:38 » |
|
princec pointed me to JSmooth and I did the latest FlyingGuns filedownloads with it. Really smooth, cool tool!
|
|
|
|
VeaR
|
 |
«
Reply #11 - Posted
2005-09-21 13:43:39 » |
|
I use Launch4j: http://launch4j.sourceforge.net/Jsmooth has the benefit of be able to pack more JAR's into the EXE, but i had a problem with it (it does not find Java on every computer succesfully).
|
|
|
|
|
cborders
|
 |
«
Reply #12 - Posted
2005-09-23 04:31:29 » |
|
Is there any way to make a batch file so that it doesn't pop up a dos window?
|
|
|
|
|
Jeff
|
 |
«
Reply #13 - Posted
2005-09-23 05:38:26 » |
|
Is there any way to make a batch file so that it doesn't pop up a dos window?
use javaw, not java. Then you need to launch it correctly from the batch file. I think the command is "call javaw...." and it make take some parameters to be windowless... EDIT: The command is "start /B javaw ... " look here: http://www.computerhope.com/starthlp.htm
|
|
|
|
cborders
|
 |
«
Reply #14 - Posted
2005-09-23 06:15:27 » |
|
Awesome! Thank you!
|
|
|
|
|
blahblahblahh
|
 |
«
Reply #15 - Posted
2005-09-23 21:44:49 » |
|
no! dont do it! thats all correct, but its a horrible way to do things  . making an exe that contains an entire JVM is one thing (IMHO not the nicest, but practicality is sometimes more important), but distributing batch files is simply unforgivable - Use the JAR, Luke!
|
malloc will be first against the wall when the revolution comes...
|
|
|
cborders
|
 |
«
Reply #16 - Posted
2005-09-23 21:57:32 » |
|
I ended up using JSmooth! It's a pretty nifty tool!
@blah^3 I know that you thing jars are perfect, but I still think it looks better to give out an exe on a windows platform, but I will agree with you that webstart is good too!
|
|
|
|
|
erikd
|
 |
«
Reply #17 - Posted
2005-09-24 00:11:36 » |
|
distributing batch files is simply unforgivable If I have to download a jar which doesn't come with some sort of launcher (be it a script or an exe), it just won't work with me: It will open my zip tool, and most probably I won't bother trying to boot the jar. You may *never* trust that .jar is associated with java. So what makes .bat and .sh files so unforgivable? I agree it isn't the nicest way of doing things and you depend on the user having a correct java version installed, but other than that it works, doesn't it...
|
|
|
|
cborders
|
 |
«
Reply #18 - Posted
2005-09-24 00:36:37 » |
|
It does, I think that his objection is a question of elegance! 
|
|
|
|
|
blahblahblahh
|
 |
«
Reply #19 - Posted
2005-10-05 15:55:52 » |
|
distributing batch files is simply unforgivable So what makes .bat and .sh files so unforgivable? I agree it isn't the nicest way of doing things and you depend on the user having a correct java version installed, but other than that it works, doesn't it... Mainly that 4 out of 5 of those shell scripts, and 2 out of 5 of those batch files are broken IME (have seen circa 50 different games use them by now). When I say "broken" I mean "wont work at all on many systems because the author just copy/pasted a complex command line wihtout knowing how batch / shell scripts work and the things that would be likely to make them go wrong". Often it's a case of assuming a certain JVM version and using CLI options taht are version specific. Often it's HARD-CODING the location of the JVM executble (including version number in the path!). For shell scripts, it's usually makign use of unix tools that are often not installed on other people's unix boxes. Things that will be on any kernel dev's machine, but not on a normal desktop. So many problems, so little benefit...
|
malloc will be first against the wall when the revolution comes...
|
|
|
g666
|
 |
«
Reply #20 - Posted
2005-10-05 22:53:16 » |
|
is there anything wrong with this in a .bat or .cmd for windows? java MainClass that is what i normally see and usually works 
|
desperately seeking sanity
|
|
|
Riven
|
 |
«
Reply #21 - Posted
2005-10-05 23:00:24 » |
|
Well that's only really an option with a few class-files, otherwise you get this big mess of packages (dir-trees) with tiny class-files.
It's cleaner to wrap it all up in a jar.
|
|
|
|
g666
|
 |
«
Reply #22 - Posted
2005-10-08 21:39:35 » |
|
Well that's only really an option with a few class-files, otherwise you get this big mess of packages (dir-trees) with tiny class-files.
It's cleaner to wrap it all up in a jar.
yeah , i maent that i havent seen a bat file that doesnt work for obvious reasons yet.
|
desperately seeking sanity
|
|
|
Malohkan
|
 |
«
Reply #23 - Posted
2005-10-12 18:19:42 » |
|
I'm with blah^3*h on this one. I hope to encourage gamers to acknowledge the benefit and beauty of Webstart and let them see quality games run smoothly using it. Rather than submit to the idea that the ignorant potential buyer will look more highly on an .exe than a webstart app, I hope to be part of the army to educate them 
|
|
|
|
Riven
|
 |
«
Reply #24 - Posted
2005-10-12 18:53:01 » |
|
But if your rely on those 'ignorant' players, ditch WebStart (for win32) and make yourself some kicker EXEs.
You can add webstart as an alternative way to launch your game. Once they see the benefits, they'll switch, not a minute earlier.
|
|
|
|
erikd
|
 |
«
Reply #25 - Posted
2005-10-12 19:03:06 » |
|
I'm with blah^3*h on this one. I hope to encourage gamers to acknowledge the benefit and beauty of Webstart and let them see quality games run smoothly using it. Rather than submit to the idea that the ignorant potential buyer will look more highly on an .exe than a webstart app, I hope to be part of the army to educate them Oh, I'm all for that.  It's just that right now, JWS is not the way to go in some circumstances if you want to make money. One of the (better) reasons some people hate JWS is that they feel out of control. They can't archive it, so when they have to reinstall for example, the game is gone unless the server where he got it from still exists (if he even remembers where he got it from). So if you do a proper distribution which most people will install, in many cases you'll be better off making it downloadable. Of course it looks better to wrap it in an exe for the final distro, but until then, a simple .bat file is perfectly fine as far as I'm concerned. Of course in other cases, JWS is the preferred distribution over an exe. For example, my emulator stores scores on the internet. This is not as straightforward to develop as internet high scores in your own games, so there's bound to be some bug here and there which will send bogus scores to the internet. Using JWS, I can make (almost) sure that people who play will have the latest version and that there will be no old distro's around that send bogus scores. Since I host the high scores, it makes *me* more in control over them.
|
|
|
|
|