2

I wrote some app and I need to install this app simultaneously with JRE on the client computer. I mean I need to make installation package with Java and my app. How can I do this?

narsereg
  • 31
  • 2
  • Are you sure your clients don't have JRE installed ? Most desktop computers do. Maybe you should just check whether the client has JRE and provide a link with instructions in case they don't ? – yurib Jan 10 '11 at 08:22
  • @yurib, Something like launch4J would be a better option there, as you can set up a minimum JRE version and it will check and offer installation if missing. No need to do that manually. – Riaan Cornelius Jan 10 '11 at 08:28

3 Answers3

1

Have a look at izPack: http://izpack.org/downloads/

The native launcher will do what you need.

The download page has information on Launch4J which is also a very good option.

This question has been covered before though. This question gives a great overview: What's the best way to distribute java applications

Community
  • 1
  • 1
Riaan Cornelius
  • 1,933
  • 1
  • 14
  • 17
0

There a few methods that you an do it. First of all you can deploy jre using silent installation. Please read the following article:

http://download.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/silent.html

The second option is to install MSI package using few tools, for example http://dennisbareis.com/makemsi.htm

and then to deploy it using group policy or what ever.

danny.lesnik
  • 18,479
  • 29
  • 135
  • 200
  • I think this is more complicated than it needs to be. If you want to do silent deployment, you should check whether a compatible JRE is already installed before you just go and install a new one. It's not worth the effort considering the options for tools that will do this automatically. You can even get these tools to download the latest JRE installer so that you don't need to package it with your installer. See the question linked in my answer for more info. – Riaan Cornelius Jan 10 '11 at 08:37
  • I don't think this is more complicated that it needs to be, because the question is about application also. He need s to deploy jre + application classes + i believe there should be some kind of batch and desktop icon to run this app. – danny.lesnik Jan 10 '11 at 09:39
  • Sure, he needs some kind of way to launch the app (Which Launch4j will be able to wrap in an executable btw), but that's not what your answer or my comment was about. What I mean with my comment is that something like Launch4j will automatically check the JRE and and download / install if necessary. What you are proposing with the silent JRE deployment would require the OP to manually build that functionality for his app, which is more complicated than letting some existing tool do it for you. – Riaan Cornelius Jan 10 '11 at 11:04
0

You may want to make the installation program available as a Java applet. This moves the problem of installing Java to the browser, and will make your logic much simpler.

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347