Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Exe's  (Read 3040 times)
0 Members and 1 Guest are viewing this topic.
Offline cborders

Junior Member





« 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?
Offline 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.  Wink
Offline cborders

Junior Member





« 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!
Try the Free Demo of Revenge of the Titans
Offline f.l.x

Senior Member


Projects: 3


there is no place like 127.0.0.1


« Reply #3 - Posted 2005-09-16 20:46:24 »

you can allways hack a little c and code a launcher.

Litterarum radices amaras, fructus dulces
http://flx.proyectoanonimo.com
figth spam!
Offline cborders

Junior Member





« Reply #4 - Posted 2005-09-16 20:56:27 »

True!  I'll look into that!  Thanks!
Offline Jackal von ÖRF

Junior Member





« Reply #5 - Posted 2005-09-17 18:16:25 »

For a wrapper you can use JSmooth.
http://jsmooth.sourceforge.net/

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

:: JOODE :: Xith3d :: OdeJava ::
Offline cborders

Junior Member





« 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.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« 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...
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 50
Projects: 15


★★★★★


« 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!
Try the Free Demo of Droid Assault
Offline Herkules

Senior Member




Friendly fire isn't friendly!


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

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline VeaR

Junior Member





« 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).
Offline cborders

Junior Member





« 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?
Offline Jeff

JGO Coder




Got any cats?


« 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

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline cborders

Junior Member





« Reply #14 - Posted 2005-09-23 06:15:27 »

Awesome!  Thank you!
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #15 - Posted 2005-09-23 21:44:49 »

no! dont do it! thats all correct, but its a horrible way to do things Sad. 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...
Offline cborders

Junior Member





« 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!
Offline erikd

JGO Knight


Medals: 3
Projects: 3


Maximumisness


« Reply #17 - Posted 2005-09-24 00:11:36 »

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

Offline cborders

Junior Member





« Reply #18 - Posted 2005-09-24 00:36:37 »

It does, I think that his objection is a question of elegance!   Grin
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #19 - Posted 2005-10-05 15:55:52 »

Quote
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...
Offline g666

Junior Member





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

desperately seeking sanity
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 438
Projects: 4


Hand over your head.


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

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline g666

Junior Member





« 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
Offline Malohkan

Senior Member




while (true) System.out.println("WOO!!!!");


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

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 438
Projects: 4


Hand over your head.


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

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline erikd

JGO Knight


Medals: 3
Projects: 3


Maximumisness


« Reply #25 - Posted 2005-10-12 19:03:06 »

Quote
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.  Smiley
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.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (78 views)
2013-05-17 21:29:12

alaslipknot (89 views)
2013-05-16 21:24:48

gouessej (121 views)
2013-05-16 00:53:38

gouessej (113 views)
2013-05-16 00:17:58

theagentd (126 views)
2013-05-15 15:01:13

theagentd (113 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (179 views)
2013-05-12 17:10:36

kutucuk (179 views)
2013-05-12 15:36:09

UnluckyDevil (186 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.162 seconds with 21 queries.