Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

[java] Java deployment to MS Windows

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
9 replies to this topic

#1 TheCrow33   Members   

120
Like
0Likes
Like

Posted 14 June 2011 - 08:36 AM

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.

#2 Angex   Members   

884
Like
1Likes
Like

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

#3 TheCrow33   Members   

120
Like
0Likes
Like

Posted 14 June 2011 - 02:05 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

#4 SimonForsman   Members   

7633
Like
0Likes
Like

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

#5 i_luv_cplusplus   Members   

250
Like
0Likes
Like

Posted 14 June 2011 - 03:25 PM

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

#6 LorenzoGatti   Members   

4364
Like
0Likes
Like

Posted 15 June 2011 - 07:01 AM

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


#7 Glass_Knife   Moderators   

8624
Like
0Likes
Like

Posted 15 June 2011 - 11:32 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?

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


#8 SimonForsman   Members   

7633
Like
0Likes
Like

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

#9 Glass_Knife   Moderators   

8624
Like
0Likes
Like

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?

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


#10 SimonForsman   Members   

7633
Like
0Likes
Like

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




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.