[java] Java deployment to MS Windows
#1 Members - Reputation: 120
Posted 14 June 2011 - 08:36 AM
#2 Members - Reputation: 593
Posted 14 June 2011 - 01:02 PM
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
#4 Members - Reputation: 3823
Posted 14 June 2011 - 03:10 PM
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
The voices in my head may not be real, but they have some good ideas!
#6 Members - Reputation: 1346
Posted 15 June 2011 - 07:01 AM
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).try this http://launch4j.sourceforge.net/
#7 Moderators - Reputation: 1563
Posted 15 June 2011 - 11:32 AM
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?
#8 Members - Reputation: 3823
Posted 15 June 2011 - 11:45 AM
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.
The voices in my head may not be real, but they have some good ideas!
#9 Moderators - Reputation: 1563
Posted 15 June 2011 - 01:23 PM
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?
#10 Members - Reputation: 3823
Posted 15 June 2011 - 02:16 PM
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?
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)
The voices in my head may not be real, but they have some good ideas!






