Hi Prosenjit, Just thinking aloud why you need to convert the *.class file into an *.exe. If the idea is to run it on any platform then why would you want to convert a byte code into a specific platform depending *.exe file. The byte is anyway platform independent write once, run everywhere! Ravindra Mohan.
If you just want to be able to invoke a java application, normally you write a .bat file with the commands to invoke the application. Then you can have an icon that executes the bat file. or you can double click on the bat file from explorer.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Keep in mind that (to my knowledge, anyway) you can't simply copy a java application onto a floppy and transport it to any machine and run it (the way you can some EXE files) unless that machine has a JRE installed.
You can do it. Many of the IDE's support this directly. There are other products out there you can purchase. you should note that there is little (if any) performance improvement in creating an exe file.
Hi Sirs, Thanks to everybody who answered me. I had to post my question to get the answer. But yet I don't have the correct answer. Mr. Thomas Paul says that it is possible to convert a .java file to an .exe file. But it is not mentioned that how (by using which program and particularly where can I get that) is it possible. It is a known fact that a .class file can be decompiled. So, a programmer cannot hide his valuable source code. My only intension in not to run the code everywhere but to hide the source code. Again, it would be better if I can make the .exe file platform independent. Please please answer me.
posted 17 years ago
I would suggest that you go to http://www.google.com and do a search. That is what search engines are used for.
[This message has been edited by Thomas Paul (edited May 25, 2001).]
Thanks again for answering me. Special thanks goes to Mr. Thomas Paul and Mr. John Zukowski (with reference to http://www.javaranch.com/ubb/Forum1/HTML/001312.html ). So, the situation is that I can make .Exe file from a .Java one by using a software like J2Exe which is nothing but a wrapper class and thus can be breakable to get the source code. My question is, [b]is there any way to absolutely hide my source code?