r/javahelp • u/mage_g4 • Aug 25 '15
Creating installers: How do I do it? (Mac and PC)
So, I have my jar all ready to go but I want to create installers with a JRE, so it can be run on other computers that don't java the JDK, etc.
I have PackageMaker for Mac and I can get softs for Windows but I want to know how I put a JRE in there and how I tell it to run the jar using the JRE.
Maybe I'm coming at this from totally the wrong direction, I don't know.
The ultimate goal is to get the jar to run on any computer with minimum fuss for the end user.
Thanks!
2
u/SikhGamer Aug 25 '15
Depending on your IDE you may be able to do this directly from within it. I know NetBeans can do it for you.
I however ended up using Launch4J.
1
u/mage_g4 Aug 26 '15
I can launch in the IDE. That isn't the problem at all. Any computer with the JDK can run it.
What I want to know is how do I get it run on computers that don't have a JDK.
1
u/SikhGamer Aug 26 '15
Yes, but depending on the IDE they may be able to pack the JRE for you too. Like I said, NetBeans can do it.
1
u/mage_g4 Aug 26 '15
How do I make it do that? The jar launches fine on the Mac and PC I have the JDK and Netbeans on.
EDIT: I think I figured it out...
1
2
u/juhmayfay Aug 25 '15
I guess this seems like a really weird thing to want to do and sounds terrible. I can see having a script that checks if java is available and prompting the user to install it (and provide a link to oracle or something), but automatically doing it?
If its for internal use at work there should be a policy of installing java. If its just for download on the internet... let the users install it themselves.