[java] Java deployment to MS Windows

Started by
8 comments, last by SimonForsman 12 years, 10 months ago
I have a bit of an odd question... How do most Java developers deploy applications for use with MS Windows? At the moment the only application (as in not applet meant to be run through a browser) that I can think of being programmed in Java and runnable on Windows is Minecraft. I know that Minecraft has been able to convert his whole project to an EXE binary, but I'm not real sure how he managed to do that, any ideas? Any other ideas as to how to get a non-tech-savy person to be able to double-click a Java application to run it? I'm asking these questions because I haven't owned a copy of Windows in a couple years and I personally feel Java is one of the most useful languages for the projects I'm currently taking on.
Advertisement

I know that Minecraft has been able to convert his whole project to an EXE binary, but I'm not real sure how he managed to do that, any ideas?


There are compilers available that can directly produce machine code: Example



Any other ideas as to how to get a non-tech-savy person to be able to double-click a Java application to run it?


For smaller applications I'd reccommend Java WebStart
Yeah I feared that cross-compiling was going to be the way to do it, I had messed with gcj before to make a native elf binary but never went as far as to build a cross-compiler. Anyway thanks for the response

Yeah I feared that cross-compiling was going to be the way to do it, I had messed with gcj before to make a native elf binary but never went as far as to build a cross-compiler. Anyway thanks for the response


You don't have to crosscompile, gcj is available for windows through the mingw project.

http://www.thisiscool.com/gcc_mingw.htm
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
try this http://launch4j.sourceforge.net/
OpenGL fanboy.

try this http://launch4j.sourceforge.net/

Seconded, avoid unusual time-consuming alternative platforms: you only need a little executable to launch the normal JRE virtual machine (which you can bundle with your program if you want).

Omae Wa Mou Shindeiru

Forgive me for asking the silly question, but why not just a jar file?

If you want to launch a java program, why not just put it in a jar file with a manifest file so that when they double click it, it runs.
The last Java game I made worked this way, and I sent it to all my friends, who tried it on MAC, Windows, and Linux.
Worked great.

I am sure that the Windows launching software would work too, but why even go there?

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532


Forgive me for asking the silly question, but why not just a jar file?

If you want to launch a java program, why not just put it in a jar file with a manifest file so that when they double click it, it runs.
The last Java game I made worked this way, and I sent it to all my friends, who tried it on MAC, Windows, and Linux.
Worked great.

I am sure that the Windows launching software would work too, but why even go there?


The problem on Windows is that some software hijacks the .jar extension (winrar being one of the more common offenders) which causes problems for end users.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

The problem on Windows is that some software hijacks the .jar extension (winrar being one of the more common offenders) which causes problems for end users.


I have never hear of this problem before. I do lots of Java stuff, but I don't every release it for the public, so I knew there had to be weird issues like this that I've never heard of.

I don't want to install this to break my Java, but I imagine that it changes the file association so that double clicking no longer works?
Is that what happens?

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532


[quote name='SimonForsman' timestamp='1308159922' post='4823704']
The problem on Windows is that some software hijacks the .jar extension (winrar being one of the more common offenders) which causes problems for end users.


I have never hear of this problem before. I do lots of Java stuff, but I don't every release it for the public, so I knew there had to be weird issues like this that I've never heard of.

I don't want to install this to break my Java, but I imagine that it changes the file association so that double clicking no longer works?
Is that what happens?
[/quote]

Yes, winrar basically associates .jar files with itself and opens the archive for extraction. (its easily fixable ofcourse but for the average user it can be very frustrating)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

This topic is closed to new replies.

Advertisement