I finished my first program in Java, and I want to convert it to an .exe file to make it runnable in Windows, so I downloaded Launch4j to convert jar files to exe files. I followed this guide, but when I click on the launch4j icon nothing happened, so I used java -jar launch4j.jar instead, but I got this error.
I created an executable jar file bundled with JOGL, then wrapped the jar into a windows executable using Launch4j in order to pass runtime java parameters. If I run the jar from a command prompt I get no errors. If instead I run the Launch4J executable I get the errors shown below, but the application nevertheless runs properly, displaying the correct graphics. So, the problem seems to lie with the Launch4J executable and not the executable jar.
Is there any way to get a jar file from a jar wrapped using a exe wrapper.I have an exe file and I know that it was wrapper using exe wrapper (launch4j to be precise).How do I unwrap this jar to get back the jar.I have seen that I can unwrap it in Linux using fileroller, how do I do it in windows
I assume you want to extract a JAR file wrapped inside a .exe generated by launch4j. Launch4j places the jar file in the overlay of the executable, that is after the PE file. To extract it you can search for the string 'PK' from the bottom of the file to find the JAR archive, you should see something like this :
to build a Windows exe file that I can distribute to users. That's all working well, except I have two or three different different Windows exe files that I need to distribute. I have a different icon that is associated to each exe file so the two exe are easily identified, but the problem is when two or more of these are started both form tasks have the default java coffee cup icon in the taskbar. That seems to be causing some minor issues with my users.
Launch4J is an open-source tool for distributing Java applications as Windows .exe programs. It is used to create a drjava.exe file when new releases of the application are published. Because it is implemented using platform-specific libraries, developers wishing to create releases must install it separately and set it up for the Ant script by defining the LAUNCH4J_HOME environment variable.
You need JRE installed on your Windows machine and a working .jar file. If you can run the jar file from the command line with the java -jar command, you will probably be able to create the installer too.