File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Source code security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Source code security" Watch "Source code security" New topic
Author

Source code security

moha moha
Greenhorn

Joined: Feb 10, 2008
Posts: 1
Hello Experts,
I have a serious question. Assume, I want to develop a commercial software, putting in lots of functionalities. I do not want to give away my source doe in the form of class files which can be decompiled to extract the source code. My questions are as follows:

1. How do I create my program as a exe file (Similar to VB where the source cannot be extracted)?
2. How do I ensure that my source code is safe and secure?
3. How do i ensure that the class files I create are not taken away and the class file is not decompiled and used?

May be the questions are naive, but then I'm desperately looking for answers.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
Hello "moha moha"-

Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your questions:
1. How do I create my program as a exe file (Similar to VB where the source cannot be extracted)?

Compilers exist that create native code (as opposed to bytecode), e.g. GCJ. They may not be able to preserve all semantics of dynamic Java code, but it may be worth to try and see what it can do for your application.

2. How do I ensure that my source code is safe and secure?

I don't understand this. You're not giving away the source code with the executable, are you? So there's nothing to be concerned about.

3. How do i ensure that the class files I create are not taken away and the class file is not decompiled and used?

Class files can always be decompiled. You can make it harder to decompile, and harder to make sense of the source, but a technically savvy attacker can always recover the source. Some hints on what you can do can be found here, up to keeping critical parts of the source running online on a server you control.


Ping & DNS - updated with new look and Ping home screen widget
 
Consider Paul's rocket mass heater.
 
subject: Source code security
 
Similar Threads
Securing jar files [urgent]
How to secure my java class files
How to create exe file
How to prevent Decompiling
Anti decompiling source code