• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to make EXE files in JAVA

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends,
I am programming in java for last one year. nowadays, I am making a project using SWING & AWT. I want to make an EXE file of my project so that the source code remains protected. Can anyone Tell me how to do so? I am new in this forum, but I am assure that everyone will be kind to me.
Thanks a lot in advance.
-Kapil Chugh
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kapil,
Well I dont think you make an exe file here. But you can distribute class files and if you want jar it and distribute. They are binary and normally people wont be able to read the source code.
Nasser
 
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gautam Chugh:
so that the source code remains protected.


Just one question ...Why do you want to keep your source code protected ???
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gautam
This question has been asked many times before - please check out the search page for an answer. You'll get one faster that way!!
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you just want to protect your code, look for an Obfuscator in google.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
a few things.
First making an exe will not "Protect" your code, as decompilers exist to decompile any program. You could compile your source code with the -o switch will obfuscate your code ( meaning, it will rename methods and classes so that only a machine could understand it. )
second a jar file is just an equivalent to a "zip" or "tar" file. So anyone with winzip or a unzip utility of the sorts could open the Jar and take a look at the source.
Third the main advantage to making an exe is to be able to lauch if with a double click action ( or similar lauching tactic ). but by making an exe you have just removed the portability of your code to multiple platforms.
By making an exe you are taking the class files and turning them into machine specific byte code.
fourth, if you really want to make an exe, you can do a search on download.com for Java EXE, and you will find a list of programs to do so.
Tim
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic