I have .exe file called Myapp.exe.. Now i want to convert .exe to jar file.. That jar file should work in non java system also? I dont have any idea to implement it.. Can anyone plz suggest me how to do it? Thanks in advance..

doubt you'll be able to do that. first of all, are you sure your Myapp application was written in Java?
also: "That jar file should work in non java system also" ?????

jar means: Java ARchive. how would you imagine that being runnable in a "non java system"?

anyway, maybe this link can help you out.

If you want a run an exe file by running a jar file, then you might want to consider JPC. It is an x86 PC emulator made purely out of Java and it supposedly works quite well. You would need to have your exe and JPC in the jar at least, and from browsing the website it looks like some sort of operating system would also need to be in the jar.

I hope it's possible for the the operating system in the emulated PC to be a facade for the real operating system, but I also wouldn't be surprised if that's not possible. Either way, your exe file would be running.

why i am doing all those stubs is for making my jar has to work in java not installed system..
I have an jar called Myapp.jar.. It is working fine in java installed system.. And my task is to Bundle jre inside jar(Not along with jar(i.e we can put jre and jar in same folder to run a jar as given in following url http://www.mindfiresolutions.com/Run-jar-without-jre-on-windows-machine-76.php )). and I should not use any tools to convert jar into .exe file.. Because i have to give jar file only to client,in such a way that they can use this Myapp.jar in non java system also.. But,i dont know how to bundle jre inside jar.. Though i do bundle and all..I Dont how to run jre inside jar.. when ever we want to run jar,First of all,we must run our jre,then only we can run our jar.. Please provide me the solutions to bundle jre inside jar and how to run a jar? Thanks in advance....

Nagarajan M: You already have a thread for this topic. Do not start duplicate threads for the same topic, it just confuses people and wastes their time. I have closed your old thread.

Thanks for pointing that out stultuske.

Nagarajan M: Take a moment read the DaniWeb Rules that you agreed to when you joined Daniweb. If you continue to ignore them you risk an infraction and a possible ban.

another reason not to do so: for a simple 5kb application, you would have to add all the jre's that exist, making it probably a few 100MB's. the sole reason why Java is platform independent is basically because the jre is not.

each platform has it's own jre, which all can work with the same .class files, and which will tackle the differences on the different platforms.

This article has been dead for over six months. Start a new discussion instead.