I just found your proect here and was all excited cause you have an ant task for it and it works on linux as well. But now I'm wondering if I can use it. My application uses other jar files. Things like log4j for example. So I need to be able to have my executible jar file and then all the other jar file I need to all be bundled up into the exe file. Can this be done? I can't imagine no one else has asked for this before...Let me know.
Thanks!
Andrew
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I took a look at the Builder source code and it looks like you only add what is referenced by the <jar> element in the properties file. I don't know how the layout of the exe works, but I know other install makers do this, so can't you just take a list of jar files and write them all to the exe? I would try it, but I don't know how to build your app. You don't have any source in CVS, so I assume you are the only one working on this and have your own setup to build. Let me know if you think this is possible and when you would be willing to implement it. Thanks!
Andrew
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It won't work because launch4j doesn't extract anything from the output executable, which is a jar. It would be like appending one jar to another. Use NSIS or Inno Setup to create a single file installer and launch4j to turn your application jar into an executable file.
Grzegorz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You could try to use One-JAR (http://one-jar.sourceforge.net/) to make a only jar file. Then use launch4j with this jar file. I don't test yet, but it may work. There is an eclipse plugin for one-jar (http://fjep.sourceforge.net/).
This is my first post in this forum, I hope it be useful for you.
Patricio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually, I'm using NSIS now. There is a script out there called jelude that is just a pre written nsis script that will make your exe for you. So now I have all my jar files going into one exe file. I have no use for launch4j now...so anyone else needing the same thing, check out nsis.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Launch4j is not an installer/setup program, it starts Java applications packaged as jars without extracting them. NSIS is a great project - launch4j 2.0.0 installer was created with it and I recommend it whenever somebody ask about packaging multiple jars. But using an installer to run a program is a different thing. First of all, either Jelude has to extract all files EVERY time someone runs the program - as if the startup process wasn't slow already. Or it can leave the extracted files somewhere on the disk and extract newer files only - end of single exe magic.
Programs should be distributed as single files, whether executable installers or zip archives, there's no doubt about that. But what good is pretending that your program is a single file, when it's not. Especially if it causes performance problems.
Grzegorz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The FAT Jar Eclipse Plugin works very, very well for me with multiple projects being put in a single jar directly from Eclipse.
I have verified that these generated Jars work with launch4j 2.1.1.
In my eyes this is a perfect combination.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-02-22
I use Maven1 and Maven2 to build my exectuable "uberjar". In Maven1 I use the javaapp goal and in Maven2 they have a built in Assembly goal to build the uberjar. I then called Launch4j Ant script as a post goal so in one Maven step I can build all my code, build the jar, and then wrap it in Launch4j exe. It works incredibly well for my purposes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I just found your proect here and was all excited cause you have an ant task for it and it works on linux as well. But now I'm wondering if I can use it. My application uses other jar files. Things like log4j for example. So I need to be able to have my executible jar file and then all the other jar file I need to all be bundled up into the exe file. Can this be done? I can't imagine no one else has asked for this before...Let me know.
Thanks!
Andrew
Ok, I took a look at the Builder source code and it looks like you only add what is referenced by the <jar> element in the properties file. I don't know how the layout of the exe works, but I know other install makers do this, so can't you just take a list of jar files and write them all to the exe? I would try it, but I don't know how to build your app. You don't have any source in CVS, so I assume you are the only one working on this and have your own setup to build. Let me know if you think this is possible and when you would be willing to implement it. Thanks!
Andrew
Hi,
It won't work because launch4j doesn't extract anything from the output executable, which is a jar. It would be like appending one jar to another. Use NSIS or Inno Setup to create a single file installer and launch4j to turn your application jar into an executable file.
Grzegorz
You could try to use One-JAR (http://one-jar.sourceforge.net/) to make a only jar file. Then use launch4j with this jar file. I don't test yet, but it may work. There is an eclipse plugin for one-jar (http://fjep.sourceforge.net/).
This is my first post in this forum, I hope it be useful for you.
Patricio
Actually, I'm using NSIS now. There is a script out there called jelude that is just a pre written nsis script that will make your exe for you. So now I have all my jar files going into one exe file. I have no use for launch4j now...so anyone else needing the same thing, check out nsis.
Launch4j is not an installer/setup program, it starts Java applications packaged as jars without extracting them. NSIS is a great project - launch4j 2.0.0 installer was created with it and I recommend it whenever somebody ask about packaging multiple jars. But using an installer to run a program is a different thing. First of all, either Jelude has to extract all files EVERY time someone runs the program - as if the startup process wasn't slow already. Or it can leave the extracted files somewhere on the disk and extract newer files only - end of single exe magic.
Programs should be distributed as single files, whether executable installers or zip archives, there's no doubt about that. But what good is pretending that your program is a single file, when it's not. Especially if it causes performance problems.
Grzegorz
The FAT Jar Eclipse Plugin works very, very well for me with multiple projects being put in a single jar directly from Eclipse.
I have verified that these generated Jars work with launch4j 2.1.1.
In my eyes this is a perfect combination.
I use Maven1 and Maven2 to build my exectuable "uberjar". In Maven1 I use the javaapp goal and in Maven2 they have a built in Assembly goal to build the uberjar. I then called Launch4j Ant script as a post goal so in one Maven step I can build all my code, build the jar, and then wrap it in Launch4j exe. It works incredibly well for my purposes.
I agree. If someone must create a single file application then a jar with all dependencies is the way to do it.
Grzegorz