launch4j

JNI error occurred after converting jar to exe launch4j

本小妞迷上赌 提交于 2021-01-05 07:28:20
问题 I created JAR file of my JavaFX application. JAR file is working perfectly fine without any error. But when i converted jar into exe using launch4j and tried to open exe file file it gives two errors: Java Virtual Machine Launcher Error: A JNI error has occurred, please check your installation and try again. Java Virtual Machine Launcher A Java Exception has occurred. Here is the log: Exception in thread "main" java.lang.UnsupportedClassVersionError: Main has been compiled by a more recent

JNI error occurred after converting jar to exe launch4j

ぐ巨炮叔叔 提交于 2021-01-05 07:27:26
问题 I created JAR file of my JavaFX application. JAR file is working perfectly fine without any error. But when i converted jar into exe using launch4j and tried to open exe file file it gives two errors: Java Virtual Machine Launcher Error: A JNI error has occurred, please check your installation and try again. Java Virtual Machine Launcher A Java Exception has occurred. Here is the log: Exception in thread "main" java.lang.UnsupportedClassVersionError: Main has been compiled by a more recent

Maven 打包 .exe 可执行文件

烈酒焚心 提交于 2020-12-23 18:47:59
<build> <plugins> <plugin> <!-- 使用 maven-shade-plugin 打包项目 并导入 maven 中依赖的包 --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.1</version> <configuration> <!-- 解决 A JNI error has occurred 问题 --> <filters> <filter> <artifact>*:*</artifact> <excludes> <exclude>META-INF/*.SF</exclude> <exclude>META-INF/*.DSA</exclude> <exclude>META-INF/*.RSA</exclude> </excludes> </filter> </filters> <!-- 不生成 简易的 pom 结构 --> <createDependencyReducedPom>false</createDependencyReducedPom> </configuration> <executions> <execution> <phase>package</phase> <goals>

How to automatically update an application installed with Inno Setup

早过忘川 提交于 2020-07-07 12:33:48
问题 I have an executable application setup.exe for Windows that I realized with Launch4j/Inno Setup based on Java. I often frequently release new versions and bug fixes. I would like to know if there is a mechanism to install updates automatically? 回答1: Inno Setup does not have any built-in mechanism for implementing automatic updates. You need to implement that yourself: Make your application check for new versions (against your application webpage?). E.g. on startup (on a background thread?) If

How to automatically update an application installed with Inno Setup

社会主义新天地 提交于 2020-07-07 12:33:10
问题 I have an executable application setup.exe for Windows that I realized with Launch4j/Inno Setup based on Java. I often frequently release new versions and bug fixes. I would like to know if there is a mechanism to install updates automatically? 回答1: Inno Setup does not have any built-in mechanism for implementing automatic updates. You need to implement that yourself: Make your application check for new versions (against your application webpage?). E.g. on startup (on a background thread?) If

java service wrapper将java程序包装成系统服务(一)

こ雲淡風輕ζ 提交于 2020-05-08 02:27:52
一. 概述    使用java语言开发应用程序,在windows平台下,一般存在3种应用形式:    1. web应用 。 web应用多数打成war包在web容器(如tomcat,jetty等)中运行。    2. 桌面应用。 桌面应用一般打成jar包或exe文件运行。    3. 后台服务应用。 后台服务应用一般打成jar包,然后使用命令行(如java -jar xxx.jar)运行。 二. 什么是windows服务?    Microsoft Windows 服务(即,以前的 NT 服务)使您能够创建在它们自己的 Windows 会话中可长时间运行的可执行应用程序。这些服务可以在计算机启动时自动启动,可以 暂停和重新启动而且不显示任何用户界面。这种服务非常适合在服务器上使用,或任何时候,为了不影响在同一台计算机上工作的其他用户,需要长时间运行功能时使用。还可以在不同于登录用户的特定用户帐户或默认计算机帐户的安全上下文中运行服务。 三. 为什么要让java程序以服务形式运行?   若使用命令行方式运行java程序,把命令写成脚本(如bat脚本)运行即可,但命令行方式有其不方便之处,如命令行窗口不能关闭,关闭即停止,因此维护人员容易误操作(关闭窗口使程序停止);若服务器宕机或其它原因,程序往往无法在服务器重启时自动启动。在windows下,很多程序都是以服务的形式运行

如何将Java程序转换为.exe文件? [关闭]

别等时光非礼了梦想. 提交于 2020-02-26 11:22:03
关闭。 这个问题是 题外话 。 它当前不接受答案。 想改善这个问题吗? 更新问题 ,使其成为Stack Overflow 的主题 。 6年前 关闭。 如果我有Java源文件(* .java)或类文件(* .class),如何将其转换为.exe文件? 我的程序也需要安装程序。 #1楼 我可以原谅我反对将Java程序转换为.exe应用程序,但我有我的理由。 主要的一个原因是,可以从许多IDE将Java程序编译为jar文件。 当程序为.jar格式时,它可以在多个平台上运行,而.exe则只能在非常有限的环境中运行。 我的想法是,除非非常必要,否则不要将Java程序转换为Exe。 当它是一个jar文件时,总是可以编写运行Java程序的.bat文件。 如果确实需要将其转换为exe,则Jar2Exe转换器会静默地执行此操作,并且还可以附加与主应用程序一起编译的库。 #2楼 我会说launch4j是将Java源代码(.java)转换为.exe文件的最佳工具。您甚至可以将jre与它捆绑在一起进行分发,甚至可以将exe图标化。 尽管应用程序的大小增加了,但是即使用户没有安装jre,它也可以确保应用程序正常运行。 它还可以确保您能够提供应用所需的特定jre,而无需用户单独安装。 但是不幸的是,java失去了它的重要性。 它的多平台支持被完全忽略,最终应用仅受Windows支持。 但这不是什么大问题

Escape property in pom.xml

放肆的年华 提交于 2020-01-30 05:11:08
问题 I would like to escape a property in pom.xml. Not in ressources, I know it is possible with a filter. For example I try to use launch4j plugin like this : <plugin> <groupId>org.bluestemsoftware.open.maven.plugin</groupId> <artifactId>launch4j-plugin</artifactId> <executions> <execution> <id>l4j-cli</id> <phase>install</phase> <goals> <goal>launch4j</goal> </goals> <configuration> <headerType>console</headerType> <outfile>../out.exe</outfile> <dontWrapJar>true</dontWrapJar> <jar>./../out.jar<

Create an exe-File in Maven with VM-Arguments for said exe

我的梦境 提交于 2020-01-14 22:54:11
问题 i am currently working on a Java-Project that needs VM Arguments specifying the java.library.path. When running my program out of Eclipse - No problem, i can specify my VM arguments easily. Now i want to build my project via maven and haven't found a possibility to give said arguments to this exe. Just calling my exe with this argument on the command line does not work, so where do i have to put this information in my pom-file? 来源: https://stackoverflow.com/questions/40933950/create-an-exe

Why I receive a message from the Program Compatibility Assistant?

痴心易碎 提交于 2020-01-05 04:37:09
问题 The setup of my own program produce after finish a message from the "Program Compatibility Assistant" that the program was not installed correctly but it is all correctly. The same problem I have with the uninstaller. The problems occur under Vista. I use launch4j. Why occur this message? How can I eliminate this message that my customer does not see it? 回答1: The problem occur if you does not change any in the registry and/or the directory "program files". To solve this you need to do some