Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launch4j fails on Linux #29

Closed
klaushauschild1984 opened this issue Nov 30, 2015 · 4 comments
Closed

Launch4j fails on Linux #29

klaushauschild1984 opened this issue Nov 30, 2015 · 4 comments
Labels
automerge Automatically merges Dependabot PRs

Comments

@klaushauschild1984
Copy link

Hi,
I have a build perfectly running at Windows but fails on Linux:

[INFO] --- launch4j-maven-plugin:1.7.8:launch4j (default) @ halfnes ---
[INFO] launch4j: Compiling resources
[INFO] launch4j: Generated resource file...
[INFO] launch4j: LANGUAGE 0, 1
2 RCDATA BEGIN "1.5.0\0" END
18 RCDATA BEGIN "1\0" END
30 RCDATA BEGIN "2\0" END
25 RCDATA BEGIN "128\0" END
27 RCDATA BEGIN "1024\0" END
21 RCDATA BEGIN "http://java.com/download\0" END
20 RCDATA BEGIN "32\0" END
101 RCDATA BEGIN "An error occurred while starting the application.\0" END
102 RCDATA BEGIN "This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.\0" END
103 RCDATA BEGIN "This application requires a Java Runtime Environment\0" END
104 RCDATA BEGIN "The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\0" END
17 RCDATA BEGIN "true\0" END
[ERROR]
net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/home/travis/.m2/repository/net/sf/launch4j/launch4j/3.8.0/launch4j-3.8.0-workdir-linux/bin/windres": error=2, No such file or directory
at net.sf.launch4j.Builder.build(Builder.java:146)
at com.akathist.maven.plugins.launch4j.Launch4jMojo.execute(Launch4jMojo.java:336)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/home/travis/.m2/repository/net/sf/launch4j/launch4j/3.8.0/launch4j-3.8.0-workdir-linux/bin/windres": error=2, No such file or directory
at net.sf.launch4j.Util.exec(Util.java:160)
at net.sf.launch4j.Cmd.exec(Builder.java:212)
at net.sf.launch4j.Builder.build(Builder.java:96)
... 22 more
Caused by: java.io.IOException: Cannot run program "/home/travis/.m2/repository/net/sf/launch4j/launch4j/3.8.0/launch4j-3.8.0-workdir-linux/bin/windres": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at net.sf.launch4j.Util.exec(Util.java:128)
... 24 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:187)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 27 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

For a complete build log please see https://travis-ci.org/klaushauschild1984/halfnes/builds/93926611

@lukaszlenart
Copy link
Collaborator

Maybe it's a Travis' limitation and it cannot extract a jar. You can download the jar here and extract it by yourself and you'll notice that the windres file is there.

@Ornedan
Copy link

Ornedan commented Dec 19, 2015

The error message is wrong. The windres program is present, the failure lies in executing it. It's a 32bit binary and not all 64bit distributions install the 32bit base libraries by default.
In my case, I got a similar error and got the build working by installing 32bit glibc.

@klaushauschild1984
Copy link
Author

Can you provide the appropriate commands for the travic build?

@lukaszlenart
Copy link
Collaborator

See #4 for reference which libs are missing and this how to install them on Travis.

@lukaszlenart lukaszlenart added the automerge Automatically merges Dependabot PRs label Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merges Dependabot PRs
Projects
None yet
Development

No branches or pull requests

3 participants