Hi, I'm working on a personal project, developing a program that would help me. I just thought it would be nice if I could turn it into a click-and-run executable application rather than the .bat file I've put together.

Anyone have any ideas?

Thanks,
Lakepoint

you have to convert your application in to executable jar file..

for that you have to follow some procedure

you have to create manifest file

in that manifest file you have to mention your main class name like below.

Manifest-Version: 1.0
Specification-Title: Java Utility Classes
Created-By: 1.5.0 (Sun Microsystems Inc.)
Main-Class: mainclassname

and save it as manifest.mf and keep this file in project location.

and then you have to run the following command in DOS prompt

(go to projetlocation via command prompt)
jar cmf manifest.mf filename.jar *.*

then you will get your executable jar file

As jar file can be easily decompiled. Try using a third party tool on your jar to build an exe. This way your source code will be secured.

Its just a suggestion. :)

Comments
I have never heard something so f**king retarded in all my little life?

As jar file can be easily decompiled. Try using a third party tool on your jar to build an exe. This way your source code will be secured.

Its just a suggestion. :)

and utter nonsense.
ANYTHING can be decompiled, and tools that turn jar files into executables in fact don't do that.
All they do is add a thin stub to the jar that launches a JVM and passes it that jarfile.
The jarfile is quite easy to extract from that.

"security" and "preventing decompilation" are the worst reasons to want to turn a jarfile into an exe, and at the same time the best.
In other words, there are no valid reasons whatsoever to want to do that, and people marketing such tools are effectively marketing snake oil.

> All they do is add a thin stub to the jar that launches a JVM and passes it that jarfile.
That is just one way of doing it. There are different ways of making an executable of which one is a true way of converting java file to an executable known an Ahead of Time Compilation. This is an interesting read.

You can check some pro and cons on native compilers here, secondly what I understand is that "you may lose certain features of the Java platform if you compile to native code"

yes, you will loose a lot.
Not in the least you loose the platform independent nature of the classfile format.
You almost certainly also loose a lot of things to do with reflection and introspection, which are also lost when employing obfuscation.

And you loose an excellent opportunity to learn about the platform.

Thanks everyone for replying. I was a little busy in the adventure called real life but now that things are slowing down, I'm going to try all your suggestions and let you guys. Thanks again

yes, you will loose a lot.
Not in the least you loose the platform independent nature of the classfile format.
You almost certainly also loose a lot of things to do with reflection and introspection, which are also lost when employing obfuscation.

And you loose an excellent opportunity to learn about the platform.

hopefully ull also "loose" the inability to spell

Comments
nice one, kiddo. Very mature.
Not off to a great start here. And your use of "ull" is rather ironic in context.
This article has been dead for over six months. Start a new discussion instead.