我目前正在将我的项目桌面应用程序导出为 Eclipse 中的可运行 JAR
文件规范。这将创建一个 jar 文件,可以通过双击在 Windows 中执行它,但是如何将它变成一个像常规 Windows 应用程序一样带有图标的 .exe 文件呢?
在 Linux 中,它不能通过双击运行,所以我不得不用这个命令创建一个可执行文件:
java -jar sampleApp.jar
所以我必须运行一个单独的脚本来启动应用程序,我怎样才能使它成为带有图标的 linux 中的可执行程序?
最佳答案
对于部署 Java 桌面应用程序,最好的选择通常是安装应用程序。使用 Java Web Start . JWS 适用于 Windows、OS X 和 *nix。
..JWS provides many appealing features including, but not limited to, splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates), partitioning of natives & other resource downloads by platform, architecture or locale, configuration of run-time environment (minimum J2SE version, run-time options, RAM etc.), easy management of common resources using extensions..
请注意,“桌面集成”是指 - 桌面上的图标(以及潜在的菜单项 - 如 Windows 开始菜单)。
关于java - 在 linux 上为 .jar 文件制作可执行图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20789003/