This sounds absurd to some developers here cause you'll say just create jar file and distributre to usr but sometimes there is not possiblity of having runtime environment in windows computers.So if we can bundle the enviroment and the setup together then packing into exe and then distribute like most of commercial java application sounds better.But the problem is how to do that?

Ok creating exe will increase the size but that doesn't matter,if there is any freeware tool to accomplish just that?

Read this, it holds some interesting info

commented: Nice link :) +2

Thnaks but this site says i can't i should'nt.and it is redirecting me to some commercial apps.

Then how mozilla creates it for firefox? EXE including the JRE? or tmozilla writes it in native for each platform.

If you read more then first 5 lines you will find out more

Use something like IzPack (http://izpack.org/) to create an installer can install the JRE if necessary.

There is just NO valid reason to think you absolutely have to create an exe for a Java app. You are much better off with an executable jar file.

Executable Jar file can be good but what if want to bundle jar file and runtime environment together.Also Want to check if there is any JRE available before installing it.

Executable Jar file can be good but what if want to bundle jar file and runtime environment together.Also Want to check if there is any JRE available before installing it.

Is this a question or statement?

Once again, you are not reading the articles completely.

And I already told you to use IzPack or something like it if you need to create an installer - which will do exactly what you are asking for.

You guys are not going ahead of that post above.You think there is no way to deal with it.

I have seen many commercial application that use exe for their product.So how to do that?
No matter is recommended or somehting.There is alwasy another way.

commented: Figure it out for yourself then if you do not like the answers to your question. -1

When you come up with solution, please kindly let us know. We always look forward to learn something new.
Other then that, please do not abuse/atack other members of the forum!

You guys are not going ahead of that post above.You think there is no way to deal with it.

Once again, you have not completely read the articles posted in response. Read all of them completely. We have not said, it cannot be done, we have said, it should not be done. Now, go away, as you are either too lazy to completely read the resources suggested, or are too thick to comprehend them.

I was not attacking any one of you.I was just asking to think diffrently,there are ways.

I really appreciate all of your help.But i never mean to offend anyone with anything.

All i can say is i disagree with the article link u posted,i read it i have found the webstart and jar method not useful,so i asked ASAP with alternative.
How u interpret about my thinking is alll upto u.

But that is what we are saying. You have not read it completely. The first article also talks about AOT (Ahead Of Time) compilers, which create executables. So, as we said, you have not bothered to completely read the document, or you did not comprehend it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.