Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The executable generated by install4j doesnt start

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.

This procedure work on both Linux, Mac and Windows.

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

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.

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?

like image 536
Peter Andersson Avatar asked Oct 19 '22 21:10

Peter Andersson


1 Answers

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

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.

Alternatively, set the environment variable

INSTALL4J_LOG=yes

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

On Mac OS X, start the launcher with the environment variable

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 yes

(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.

like image 101
Ingo Kegel Avatar answered Oct 22 '22 09:10

Ingo Kegel