Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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 3529 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!
Legends of Yore - The Casual Retro Roguelike
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: 70
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!
Legends of Yore - The Casual Retro Roguelike
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 Ninja


Medals: 15
Projects: 4
Exp: 14 years


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: 605
Projects: 4
Exp: 16 years


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
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: 605
Projects: 4
Exp: 16 years


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

JGO Ninja


Medals: 15
Projects: 4
Exp: 14 years


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.

 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (25 views)
2014-04-15 18:08:23

BurntPizza (20 views)
2014-04-15 03:46:01

UprightPath (36 views)
2014-04-14 17:39:50

UprightPath (18 views)
2014-04-14 17:35:47

Porlus (34 views)
2014-04-14 15:48:38

tom_mai78101 (60 views)
2014-04-10 04:04:31

BurntPizza (118 views)
2014-04-08 23:06:04

tom_mai78101 (218 views)
2014-04-05 13:34:39

trollwarrior1 (185 views)
2014-04-04 12:06:45

CJLetsGame (192 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!