How can I create a .msi file for a Java program ? (eclipse)

前端 未结 5 398
北恋
北恋 2021-01-12 01:27

I have a java project which I\'m hoping to package and sell. How can I create a .msi file which will install my program on other windows computers? If there are any tutoria

相关标签:
5条回答
  • 2021-01-12 02:13

    If you specifically want to create an MSI package, and assuming you don't want to pay for something like InstallShield, look at Wix. http://wix.sourceforge.net/

    0 讨论(0)
  • 2021-01-12 02:14

    There's nothing special about Java apps when it comes to creating MSI's other then you have to make sure you have a JVM/JRE installed just like you have to make sure the .NET framework is installed for .NET applications.

    Your question is too broad to be able to answer. Implicit in your question is "What tool should I use?" and once that's decided "How do I make an MSI using this tool?"

    For the first question, check out:

    Windows Installer Authoring Tools for Developers

    0 讨论(0)
  • 2021-01-12 02:18

    Use NSIS: http://nsis.sourceforge.net/Main_Page . It creates executable file that will do the same thing, and it is free.

    0 讨论(0)
  • 2021-01-12 02:23

    I believe you want to look at Native Packaging, which according to this link was first introduced with JavaFX 2.2

    https://netbeans.org/kb/docs/java/native_pkg.html

    Since it seems to be official Netbeans docs, I imagine it is sanctioned by Oracle. Here is the counterpart for Mac for interested readers.

    http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html

    0 讨论(0)
  • 2021-01-12 02:24

    I've been using WiX extensively for creating MSI packages. It has quite a steep learning curve, but once you know what you're doing, it is very powerful. You said earlier that it needs Visual Studio installed, but I think it's just .NET 3.0, not the whole IDE.

    I used this WiX tutorial when I got started, and it's got pretty much everything you need in there if you want to go down this route.

    If you're after something simple, search for a tool called WixEdit on SourceForge. This has a GUI for building MSIs - it's not perfect, but pretty easy to use and produces professional results.

    I'll repeat, WiX has a very steep learning curve, and if you're just after a simple way to package your application, NSIS might be easier; or, you could use the standard IExpress.exe tool built into Windows to create a self-extracting .exe (but they don't "feel" as good as an MSI).

    0 讨论(0)
提交回复
热议问题