wood burning stoves 2.0*
The moose likes Java in General and the fly likes How to create a license for a J2EE application? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to create a license for a J2EE application?" Watch "How to create a license for a J2EE application?" New topic
Author

How to create a license for a J2EE application?

adil abdelah
Greenhorn

Joined: Mar 22, 2010
Posts: 6
Hello,

We develop a J2EE application, and we want to create a license, since the application will be hosted in the local server of the client, without Internet access.

Our need is to encrypt the application's source, and use the application in a period of one year, and just after, prohibit access to the application, the lock, if the customer does not renew its license. (Even if for a demo version)

Thank you for your suggestions, you are more experienced.

The other point is that I know that [B]. Classes [/ B] can decipher! but I have no idea if we can encrypt all sources (and even if there is that possibility, there is no way to decrypt it?

i'm sorry if my poste isn't in a good place

Thank you so much
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Why are you giving the source away? Would it not be easier to just ship the binaries? Or by "source" are you talking about web technologies (JavaScript/CSS/HTML etc.) If so, there is no way to hide these from anyone.

There is no 100% guaranteed way to do what you ask. You can obsfucate the code and add a time based license, but its not going to take too much effort for someone to work round this if they want to.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

I guess I'll put this in a more relevant place to attract more replies


SCJP, SCWCD.
|Asking Good Questions|
adil abdelah
Greenhorn

Joined: Mar 22, 2010
Posts: 6
Can you give me please un exemple ou url talk about "obsfucate the code and add a time based license" ?

I want to encrypte the pages .jsp and the .classes ! it's possible ? and there is no way to decipher all that ?

If we can found a free solution, w'll buy some solution but they must answer and satisfy our need because our solution don't communicate with Internet, it's a Intranet !

thank you
best regards
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

You can't encrypt it. You can obfuscate it, that basically means "make it less readable". But even then it's still readable (the JVM needs to be able to read it).
About the time based licence: you could write something like: if(currentDate > dayThatLicenceEnds) System.exit(1); but that will be "easy" to abuse (change system-time, change the value in the .class file).


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
adil abdelah
Greenhorn

Joined: Mar 22, 2010
Posts: 6
Yes, you are right ! everyone can change the code .class and activate the application

so, we can buy somme solution ? i don't konw it, but i supposed some thing like "use usb key for exemple" or some connecter can communicate with our application, but no bady can change the parameter or make copy this connecter or usb key

It's possible ?
adil abdelah
Greenhorn

Joined: Mar 22, 2010
Posts: 6
so, there is any solution to buy it ?

i want just to know some website talk about this security of J2EE Application with some software or application.exe for exemple, some thing like this present how work this communication ?

Cdt

Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Not really. Any solution suffers from that same issue - a determined hacker will be able to work round any key mechanism you use.
 
wood burning stoves
 
subject: How to create a license for a J2EE application?
 
Similar Threads
Rolecall Public Early Access Program Launch
Design a servlet that gets values from a file and update itself as soon as file is modified
Integration of Java application and C,C++ application
Generating an encrypted Key which will be around 32 characters
SCWCD Exam Simulator