10

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 tutorials, please direct me to them. I'm also using Eclipse if that has any bearing on how to create the .msi file.

Thanks

5 Answers 5

6

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

Sign up to request clarification or add additional context in comments.

2 Comments

WiXEdit just helped me sort out a problem with WiX 3.8! Thanks for the tip! Wish the code was more recent (hasn't been updated since 2011) but it works at least for simple installers.
NSIS is easier but I think it will not generate the msi files
4

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

4 Comments

You're quite right! I went searching for how to create an MSI and couldn't find a thing which helped me. So, which tool could/should I use to create an MSI? After I know that it can be done, I can generally figure out the how.
I updated the answer to give you a list of tools to consider. Another option is for you to consider using the services of a Windows Installer Expert / Consultant.
Any ideas on where to find a Windows Installer expert/consultant? Any particular forums or websites...?
You can email me as I am one. Or you can ask on the wix-users mailing list or reach out to Firegiant, AdvancedInstaller or InstallShield.
3

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

1 Comment

NSIS creates installs, but I don't believe it will generate them in MSI format.
3

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/

1 Comment

The WiX toolset does not require Visual Studio. It does require the .NET Framework (which is free).
2

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

1 Comment

Native Packaging can be used with pure Java SE applications, not only JavaFX applications. The problem is that some parts are platform-specific, it cannot be used to build an MSI file on other platforms than Windows. Your last link is interesting too, AppBundler supports Ant and doesn't require to be under Mac (I need to check that once for all).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.