Haven't tried it myself but it sounds like it does what you want. http://duckware.com/jexepack/index.html You can also write a little script in VB or something that will launch your .class file with the parameters you specify.
Let me ask this - why do you want to do this? To protect your source code? To make it faster? To make it easier to deploy? Based on the context that you describe your goals, I have different recommended solutions.
Well i made a work around for it I made a cpp application that embeds the first 16k with a batch file into the exe so whenever you click the exe the batch calls the java class and it works like a normal exe file, though you need java installed (1.42 or higher) Everyone with a little cpp knowledge can make that.
GCJ (part of the gnu gcc tools) compiles java source to executable machine code rather than java vm bytecode. A few people have ported the compiler to windows using various libraries (Cygwin probably has it implemented). http://www.thisiscool.com/gcc_mingw.htm is one place
Actually I want to compile the java code into .exe so that it could be run on systems not having java installed on them. Winip can not extract the files Anyways Which is the best language for developing Internet based Applications (in exe forms for windows) ?
Can I ask why you it makes any difference? For my customers, I deliver my Java programs using Installanywhere - which includes an atomic installation of Java to be used by the application. Most of my deliveries are around 16-20 MB. Once they install it, they can't tell that it is a Java application vs. an C++ .exe.
I agree with Phynder, end users don't care if its java/cpp/.net etc.. all they want is an application that runs and fit their needs.