install4j生成的可执行文件无法启动 [英] The executable generated by install4j doesnt start

查看:141
本文介绍了install4j生成的可执行文件无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在评估install4j,因为我想为Windows用户生成可执行文件。通常,我们直接在Eclipse中或使用bash脚本运行应用程序。我们有一个包含整个框架以及我们的应用程序的大罐子,还有一些依赖罐子。在部署时,我们使用一个shellscript设置类路径,并使用其他shellscript来启动单个应用程序。

I'm evaluating install4j since I want to generate an executable for our Windows-users. Normally we run our app directly in Eclipse, or using bash scripts. We have one big jar with the whole framework as well as our applications, and some dependency jars. On deployment we set the class path with one shellscript and start the individual applications using other shellscripts.

此过程在Linux,Mac和Windows上均可使用。

This procedure work on both Linux, Mac and Windows.

现在我尝试安装install4j的演示版,并且一直在努力创建安装程序。

Now I tried installing the demo version of install4j, and have been struggling to create an installer.

现在的结果是我构建了一个运行的安装程序,并将生成的EXE和所有其他文件安装在其下的目录结构中。

The result right now is that I build an installer that runs, and installs a generated EXE and all our other files in a directory structure under it.

但是,启动生成的可执行文件效果不佳。显示演示对话框,然后过一会儿应用程序退出而没有任何错误消息。

However starting the generated executable doesnt work very well. The demo dialog is shown, and then after a while the application exits without any error messages.

我的猜测当然是它崩溃了,可能是因为类路径不正确或相似的东西。

My guess is of course that it crashes, probably because the classpath is incorrect or something similar.

问题是,我已经在install4j的选项中玩了两个小时,而且行为没有任何变化,而且我处于黑暗中马上。添加整个LIB目录,扫描目录,单独添加jar等。

The problem is, I have been playing around with the options in install4j for a couple of hours without any change in behaviour, and I'm in the dark right now. Adding the whole LIB directory, "Scan directory", adding jars individually etc etc.

有什么方法可以从生成的可执行文件中获取一些调试信息吗?还是有任何信息,但出了什么问题?

Is there any way I can get some debugging information out frm the generated executable? Or any info at all abut what is going wrong?

推荐答案

生成的启动器具有调试功能 Windows和Mac OS X包含构造的类路径。

The generated launcher has debug functionality on Windows and Mac OS X that includes the constructed classpath.

在Windows上,使用参数 / create-i4j-log从命令行提示符启动启动器。将创建一个日志文件并显示一个消息框,以便您可以根据需要立即将其打开。

On Windows, start the launcher from a command line prompt with the argument /create-i4j-log. A log file will be created and a message box will be shown so you can open it immediately if you you wish.

或者,设置环境变量

INSTALL4J_LOG=yes

在那种情况下,将不会显示任何消息框,您必须在%TEMP%目录中找到日志文件( i4jlog ...)。

In that case, no message box will be shown and you have to locate the log file ("i4jlog...") in the %TEMP% directory.

在Mac OS X上,使用环境变量

INSTALL4J_LOG=yes

然后,您将在控制台应用程序中看到日志记录输出。可以通过执行

Then you will see the logging output in the Console application. Setting the environment variable can be done by executing

launchctl setenv INSTALL4J_LOG是

launchctl setenv INSTALL4J_LOG yes

(临时直到重新启动)或通过以下操作来设置环境变量像这样从命令行调用Java存根:

(temporary until reboot) or by calling the Java stub from the command line like this:

INSTALL4J_LOG=yes myLauncher.app/Contents/MacOS/JavaApplicationStub

然后,您还将在终端中看到输出。

Then you will also see the output in the terminal.

这篇关于install4j生成的可执行文件无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆