2

How to create an own installer using Java? I am not asking about any Java installer software. Anyone knows the logic or method please tell me. Is there any API available for these?

Dmitriy
  • 5,357
  • 8
  • 45
  • 57
Samurai
  • 843
  • 6
  • 23
  • 44
  • 1
    If you are willing invest some money in a tool, I'd claim your best option is to look at **install4j**. I've plugged it in many answers already and don't want to repeat myself too much, so see e.g. http://stackoverflow.com/questions/80105/whats-the-best-way-to-distribute-java-applications/844999#844999 – Jonik Apr 13 '10 at 11:39
  • Also, take a look at some of these questions: http://stackoverflow.com/questions/tagged/installer+java ...to get ideas on what options there are for distributing Java software. – Jonik Apr 13 '10 at 11:51
  • @Jonic Thanks for your link and i have already used install4j software. I have impressed because of that software only. I just want to develop a software little bit similar to install4j. – Samurai Apr 13 '10 at 11:52

4 Answers4

5

In windows you can use Advanced Installer .

Advanced Installer is the only Windows Installer authoring tool with built-in support for Java applications, integrating them fully into the Windows OS and making them look and feel just like a native application.

Using Advanced Installer you can create MSI packages for your Java applications, and allow your application to use the Windows Installer features.

http://www.advancedinstaller.com/java.html

Sajad Bahmani
  • 17,325
  • 27
  • 86
  • 108
  • @SjB I don't need any software name. I just need the concept to create it for my own. – Samurai Apr 13 '10 at 11:38
  • Advanced Installer is just one option, and it definitely is **not** the only option for producing native Windows installers for Java apps. @Samurai: umm, it doesn't really make sense to create your own installer builder... but for ideas on how to distribute Java apps, see http://stackoverflow.com/questions/80105/whats-the-best-way-to-distribute-java-applications/80597#80597 – Jonik Apr 13 '10 at 11:43
2

This is such a vague question. What do you want to install ? Options include:

  1. the JRE ?
  2. your application (a .jar) ?
  3. Registry entries ?
  4. Configuration files ?

There's no such Java API. If you need to install the JRE, then you could look at an existing deployment mechanism such as .rpm (others exist) and declare a dependency on a JRE. That way your chosen package manager will deploy all your pre-requisites.

Brian Agnew
  • 268,207
  • 37
  • 334
  • 440
2

This is a highly specialized topic, and I would be very surprised to see an answer here that satisfies your need for knowledge. If you are serious about this, you should be prepared to do your own work to research the concepts and implementation strategies.

Suggestions:

  1. Survey what the existing tools do; e.g. by reading all of the available user documentation. It should be pretty obvious how they achieve most of the things that they do, at least from a high-level perspective.

  2. Download the source code for one or more of the open-source products and read the code to figure out how it works / they work.

  3. Start designing and building your own tool and develop your own practical knowledge.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
0

Maybe start with the Windows Installer MSDN reference?

Neil Coffey
  • 21,615
  • 7
  • 62
  • 83