launch4j | git : //git.code.sf.net/p/launch4j/git | Version Control System library
kandi X-RAY | launch4j Summary
kandi X-RAY | launch4j Summary
git://git.code.sf.net/p/launch4j/git
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Prints the java
- Interprets the exit code
launch4j Key Features
launch4j Examples and Code Snippets
Community Discussions
Trending Discussions on launch4j
QUESTION
I have successfully ported my desktop application from Dagger/Spring to Micronaut/Spring (there's just way too much Spring code in there for me to be able strip it all out in a timely manner). Using Micronaut and PicoCLI everything is working beautifully in Eclipse/Gradle. It's launching, tests are passing, so now I want to do a build and install it to make sure that everything will work for our customer.
Our build (via Gradle) uses Shadow (com.github.johnrengelman.shadow) to combine our application with all of its dependencies into a single Jar file. I've checked and all expected dependencies appear to be present, and from the look of it the generated Micronaut classes are also present in the shadow jar. We then use Launch4J to make this shadow jar executable. From everything that I can tell, the output from Launch4J looks to be correct, however when I try to run the installed application, the splash screen appears for a fraction of a second and that's it. When I run the Launch4J generated executable as a jar file, I get the following:
...ANSWER
Answered 2022-Mar-30 at 13:25I haven't been able to find any information for using launch4j with more than 65535 files (i.e.: something like the shadowJar zip64 flag), nor really much of any information in this regard in general for that matter. However one solution that works for me, is to set dontWrapJar
to true
. This creates a tiny launcher for running the created jar file with the bundled JRE, rather than converting the entire jar, keeping all (or at least the majority of) the files out of the launch4j generated executable. The updated gradle task is as follows
QUESTION
I'm creating a program that uses an external library, normally the executable JAR file would have created the .dll file in the same directory so that it will launch with it, but now that I've wrapped the JAR into an .exe file with Launch4j it does not even create the .dll or start the program at all (the window/gui closes instantly after trying to start). I've tried just putting the .dll from what the JAR made before it was wrapped into the same directory as the .exe but that did not work. Also there are no errors that pop up.
What do I need to do for the program to either create the .dll and then recognize it or recognize the .dll in the same directory while it being there already?
Note: I'm 99% sure that it has to do with the .exe not finding the .dll so there's always a chance that it might be due to some other reason.
Thank you in advance!
...ANSWER
Answered 2022-Feb-04 at 06:54I managed to find out what the issue was, apparently I was using an old jdk. What I did to fix that was I pressed the JRE tab in Launch4j and changed the "Bundled JRE paths" to the one I used to compile my program.
I hope this will save someones time in the future, I know I wasted lots of time trying to figure out what the problem could've been.
If you're still having issues though it's pretty nice to be able to troubleshoot with the cmd. To do that go to Header and change "Header type" to Console, this should give you errors in the command prompt (I wish I knew this sooner).
QUESTION
Two days ago I got close to finishing a java program that wrote, I wanted to let some friends play with it for a bit to find flaws etc. I created a runnable jar trough Eclipse and then I used Launch4j to transform the runnable jar into a .exe It worked perfectly fine on my pc, but any other user couldn't open it. After a while I discovered that when people would install java JDK, it worked for about 40%, but this atleast pushed me in the direction of what the flaw is. Is there a way to (automaticly?) embed everything in the jar that my program is in need of? Or is there a way to determine what exactly it all is that people need for the .exe to run and what they are missing by running some pre-checks that can re-direct them to links where they can download this? I can't seem to find much on this subject, so I probably made a mis assumption somewhere, any help/clearance is appreciated!
...ANSWER
Answered 2022-Jan-24 at 09:24There is a new tool called jpackage, which should do what you want.
Also see the User's Guide.
QUESTION
I am making a text editor for .html, .CSS, .js, .txt etc. First I made my software in java swing and then I changed it to jar file then I changed it to exe file using launch4j and then I made it setup using innosetup but if I install this software and I right click on a file in windows explorer and choose open with and then I select my software and open it, it just open my software not the selected file so how to do it?
...ANSWER
Answered 2021-Dec-09 at 10:01Windows will supply the path to the file as args[0]
in your main
method.
QUESTION
I've built a program that allows users to create and manage a digital journal and other notes. It works alright and still needs some polishing but that's not the point. It references Java and JavaFx classes through imports. There is only one file, everything is compressed and inside that. It doesn't reference other files, except those created by the program.
I've tried many things, but nothing has seemed to work. I've tried exporting the file as runnable jar file and a normal jar file, changing how the libraries are extracted, changing command line arguments, running it through launch4j (which I still don't grasp a good understanding of, which may be a problem) and nothing has worked. Does anyone know the full process, and can walk me through it?
...ANSWER
Answered 2021-Nov-24 at 08:34create an executable jar file using command prompt
We need to create a manifest file i.e " manifest.txt "
manifest.txt
Main-Class: classname
Mandatory : Manifest file should end with the new line character .
Here Main-Class is the entry gate of the jar file (which we are going to create) , when anyone click on the executable jar file , JavaHungry main() method will be launched .
- So we need to create the jar file , so we should always put manifest.txt and classname.class together .
So in computer directory it will look like
QUESTION
I have built a Java SWT application using Eclipse on a Windows 10 (64 bit) laptop. I am trying to convert it into a .exe file so anyone can run the application regardless of having java installed.
I have used Launch4J to convert my runnable .jar file to a .exe file and I am successfully able to run it on my laptop.
However, when I try to run it on any other laptop, the .exe file does not open/does nothing on a double click.
When I tried to run the original .jar file on a different laptop from command line this is the error I am getting:
_ Other posts on here say to include JRE and libraries in the build path which I did but it did not fix the problem.
Does anyone know how to fix this and allow my application to run?
...ANSWER
Answered 2021-Nov-10 at 08:15The message means the SWT code has been compiled with Java 11 (class file version 55) but you are trying to run it with Java 8 (class file version 52).
You can't do this, you need at least Java 11 to run current versions of SWT (or any Eclipse code).
If you must run with Java 8 the SWT for Eclipse 2020-06 (4.16) was the last to be compiled for Java 8. The archive site here has that build.
QUESTION
How can I make a standalone Windows executable(.exe
) for my JavaFX
project(I wrote in IntelliJ IDEA), without an installer for my program? I want the user to download the .exe
file and run it out of the box, without an installer, even if they don't have a JRE on their computer. Is this even possible? So far I've read a little about the following options:
- launch4j - It seems to copy the required JRE files alongside the
.exe
- install4j - It makes an installer, which, once runned, creates the
.exe
file.
So, if I have understood correctly, neither of these two will help me. I found this and this posts, but they don't cover my specific case. Excuse me, if I'm asking a stupid question, this is my first ever Java GUI.
...ANSWER
Answered 2021-Nov-02 at 20:05For this you must generate a fat jar ( if your java application has dependencies ), and if it has no dependencies just leave it as it is, and then use launch4j. For creating a fat jar, do the following:
Add this bunch of code in your build.xml file:
QUESTION
I have tried converting .jar to .exe using launch4j first time.
Able to execute .jar perfectly fine. But converted exe is not working properly, there seems to be something error.
Is there a way that I can get logs for .exe file.
...ANSWER
Answered 2021-Aug-02 at 10:47Run the .exe
file from the command line so that the error shows up in the console.
QUESTION
As you probably know, since JDK 9, JRE no longer exists. So you need to create your own custom JRE with jlink. Well, so did I. And then I converted the jar to exe using launch4j. However, when I double-click it, it uses the JDK located at C:\Program File\Java\jdk-16.0.1
rather than the JRE I created. How do I make the exe use my JRE instead of the default JDK?
Thanks! Regards,
Fida
...ANSWER
Answered 2021-Jun-20 at 09:56If you want to use your jre used by applications then you have to set the path in your OS. But this will make all application to use your jre.
QUESTION
I am currently working on the final touches for my SoundSphere program and unfortinately I can not seem to get the jar file to convert to a exe file with launch4j due to this error
...ANSWER
Answered 2021-May-27 at 00:09If you do not have it already get https://adoptopenjdk.net/
If you do, i guess that you then already have jre16 as it should be part of jdk16. It seems that you have older jre installed and set as default jre. You need to change PATH in your environment variables to see java executable from jdk16 prior to jre8.
OR
You could use some JRE of 16 that has installer: https://adoptopenjdk.net/releases.html?variant=openjdk16&jvmVariant=hotspot
For example windows x64 jre16 msi installer: https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_x64_windows_hotspot_16.0.1_9.msi
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install launch4j
You can use launch4j like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the launch4j component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page