0

i have create desktop based application using java language.
now i want to give it to my client so for that i want to create executable file for java prgram
so how can i create .exe file from java program?

2
Contributors
7
Replies
27
Views
10 Months
Discussion Span
Last Post by JamesCherrill
0

You don't. Java is cross-platform, and exe files are not.
Give him the jar file and it will run on his Windows/Linux/Mac computer - anywhere with a JRE installed.

If for some obscure reason you absolutely must have an exe file for some specific operating system there are a couple of cludgy third-party utilities that make it work that way - just Google for them, but I can't recommend any.

Edited by JamesCherrill

0

ok
but i don't want to show my code to client
when i use jre, then it is possible to see code
so for this reason , i have to make .exe file
i searched alot on net but there are some tools like (launcg4j, etc) to create .exe but that exe files are running on my machine only but not others machine

2

I understand, although all they can see is the generated byte code, not your source.
Even creating an exe won't prevent a determined programmer from reverse-engineering or hacking it, so all you can ever achieve is a good enough deterrent.
You can obfuscate your shipped code to make it very hard to read or understand - it replaces variable names by meaningless random strings, shuffles code around (without changing its results) etc. That's certainly enough to stop any but the most comitted programmer. There are utilities that do it for you - google java obfuscate

Edited by JamesCherrill

0

i will try java obfuscate.. ok and this code will again run it on eclipse also?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.