Java packaging tools - alternatives for jsmooth, launch4j, onejar

谁说胖子不能爱 提交于 2019-12-17 17:42:25

问题


I have used these three open source tools for packaging my java apps, but they all look like abandon-ware now. All three are very good pieces of software. What are the options now? (or is using Java for desktop app development no longer a "hot" market for app developers to build & maintain these tools?).

1) exe wrapper: jsmooth - no new development in 2.5 years - does not support 64 bit. launch4j - no new development in over a year, supports 64 bit, but you can't sign the exe created by launch4j, so I prefer jsmooth, but it does not support 64 bit.

2) onejar: It works, but there has been no new development or web site update in more than 2.5 years. So, just want to switch to something that's supported / have a backup plan if it suddenly breaks with a new build of Java.

Thanks Edgar


回答1:


Launch4j has just been updated ! http://launch4j.sourceforge.net/changelog.html




回答2:


Did you check IzPack? This is a great piece of software to create cross-platform installers:

IzPack is an installers generator for the Java platform. It produces lightweight installers that can be run on any operating system where a Java virtual machine is available. Depending on the operating system, it can be launched by a double-click or a simple 'java -jar installer.jar' on a shell. The most common use is to distribute applications for the Java platform, but you can also use it for other kinds of projects. The main benefit of IzPack is that it provides a clean and unique way of distributing a project to users using different operating systems.

Some really famous companies and projects use it for many years (Sun Microsystems, JBoss/RedHat, the Scala language project, some ObjectWeb/OW2 projects, XWiki and many more). If it's good for them, it should be good for you :)




回答3:


Since none of the answers were approved, and JavaFX 2.2 has not been mentioned above (was not available at the time of the answers) here goes:

JavaFX 2.2 (part of Java Runtime and SDK since 7u6) allows building native exe/dmg/rpm's that tag along the full RT component as well. I believe this is a valid answer to your need, as well as an officially supported solution from Oracle.

https://blogs.oracle.com/talkingjavadeployment/entry/native_packaging_for_javafx




回答4:


Have you tried IzPack (http://izpack.org/)?




回答5:


You can try

http://winrun4j.sourceforge.net/

Has an exe with 64bit support and is quite easy to configure with an ini file.




回答6:


Maven 2 provides the ability to create a jar which contains all the dependencies as part of its assembly plugin. This combined with the jar plugin configuration of the manifest file (and specifically setting Main-class to the Class with main) is all you need to do basic packaging.

To some extent Java web start is now considered the better way to distribute Java applications and Maven 2's assembly capability combined with web start gets you everything you need without going via the exe route.




回答7:


If you just want an exe (instead of a full-blown installer) you can make one with NSIS: http://nsis.sourceforge.net/Java_Launcher_with_automatic_JRE_installation

Yes, NSIS is an installer but you can have it just run a jar in the same directory by stripping out all of the installer stuff. Basically it works like launch4j but is a lot more configurable.




回答8:


As I was fed up with recent security changes in Java Webstart, I created my own tool, JNDT. It's under GPL.

It goes farther than akauppi's suggestion because it allows to create GNU Linux packages even under Mac and Windows :) I use it to create Mac bundle under GNU Linux too. For the moment, it's just a single Ant library with a few dependencies that allows to create native self-contained application bundles for GNU Linux, Mac OS X and Windows. I use it for my first person shooter and I'm very happy with it. It bundles the JRE but it can use the system JRE if you want.

P.S: JNDT is able to create a native Windows installer as an executable with NSIS even under GNU Linux.

I understand that the GPL license discourages some developers to use my tool. In this case, rather use PackR.




回答9:


If you are using gradle, there is a plugin that uses launch4j (under the hood) and works great. It doesn't even require you to download or install launch4j, it is totally automated.

https://github.com/TheBoegl/gradle-launch4j



来源:https://stackoverflow.com/questions/1967549/java-packaging-tools-alternatives-for-jsmooth-launch4j-onejar

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!