-1

I just wonder if I use launch4j to convert jar to executable (exe file) on Windows. If I take the executable (and other created files if there is any) to another computer which doesn't have JRE installed and I don't have administrative permission, will the executable file still work? Many thanks!

-updated from here-

I didn't try launch4j yet and from reading doc I didn't quite understand really and I didn't think I get my answers. Reading english literature is very different from reading a technique doc. I have a very limited IT knowledge.

I did do a bit search here. I found someone says launch4j is just a wrapper and still need jre installed in the end user's computer, but the the post was 4 years old. So after some research I'm still not 100% sure if I need install jre in the destination computer. For me if jre is an absolute need in the destination computer, then I can forget about using launch4j as I know I won't get jre installed there. However I got a feeling launch4j maybe can somehow bundle jre with the exe file and the exe file can then be run on any computer without jre installed. I'm just trying to confirm things I'm unsure about.

So the answer I'm looking for is

1) yes still need jre installed, then I can't use launch4j

2) no you don't need jre installed, then I will learn how to use launch4j

3) depends, then I will probably give a try

However, I don't think I should be punished by being marked down because my lack of background knowledge. Although the original post does look like some random post. Thanks.

sotonLoon
  • 73
  • 1
  • 1
  • 8
  • 1
    What happened when you tried? What does the Launch4j documentation say? – Kevin Workman Jan 16 '14 at 16:17
  • @KevinWorkman No I haven't tried launch4j. I went through the doc and I'm somehow confused. I don't have any IT background so I'm unsure about what does it exactly mean. I didn't think I found my answer there. and I just updated my main post. thanks for your time. – sotonLoon Jan 16 '14 at 16:41
  • The best way to figure out how it works is to create an example project and wrap it using Launch4j. This is from the Launch4j documentation though: "Opens Java download page if an appropriate Java version cannot be found or a support website in case of an error." which makes it sounds like you don't need the JRE, but I'm not sure myself. I believe you can also choose to bundle the JRE with your jar. – Kevin Workman Jan 16 '14 at 16:46
  • @Joe You get downvoted because the information you seek can be found by reading the documentation, similar questions are already here on stackoverflow and I'm sure google would also find you an answer. In short you get downvoted because you appear (very) lazy. – Durandal Jan 16 '14 at 16:53
  • Thanks @Durandal for the advice. But again I can ensure you I'm not lazy. Before open the post I already spend 3+ hours doing my research, the reason I'm unsure of is simply because with limited IT knowledge I may not fully understand the same thing you read, unless the answer is straight forward close to a spoon-feed level... One example made me unsure of is [link](http://stackoverflow.com/questions/516399/how-do-i-create-an-exe-for-a-java-program) , if you look at the 2nd answer it says launch4j is a wrapper and need jre installed, and it gets upvoted. – sotonLoon Jan 16 '14 at 17:00
  • @sotonLoon You know whats funny? There is a "Related" column right next to *this* very question and the 3rd question from top is this http://stackoverflow.com/questions/7071133/how-to-bundle-a-jre-with-launch4j?rq=1 – Durandal Jan 16 '14 at 17:06
  • Thanks @Durandal this post was already added as my favorite before you pointed out. i read it through and that's why I did say I got impression it can bundle jre but again that post didn't answer me if an installed jre is still needed in the destination computer. I've said I'm just unsure. To ppl with an IT background that might be an obvious thing. but to me it's not. I was thinking yeah it will bundle jre with exe but do you still need jre installed in the destination computer so the whole thing will work? I suppose ppl with teaching experience will understand my point. – sotonLoon Jan 16 '14 at 17:18

1 Answers1

0

So for beginners and people who don't have an IT background like me, here's the definite answer for my own question.

"Hi guys. I just wonder if I use launch4j to convert jar to executable (exe file) on Windows. If I take the executable (and other created files if there is any) to another computer which doesn't have JRE installed and I don't have administrative permission, will the executable file still work? Many thanks!"

"Hi, The JRE is still required, the executable will not work without it. However, you can bundle the JRE with your application so even if the user does not have Java installed it is possible to run the app. Best regards, Grzegorz"

"Thanks Grzegorz! And just a small question if you could briefly explain. I noticed you used the word "posssible", does that mean there are some cases you still can't run it? I will try it out anyway cheers! Joe"

"No, there are no special cases here, if you bundle the JRE it will work. Cheers"

original post is here at this Link

Cheers!

sotonLoon
  • 73
  • 1
  • 1
  • 8