Java licensing system URGENT
Hello, Sorry to bother you busy people :cool:
I've got a client i dont trust will pay me after a week of testing the program i have developed.
Could somebody direct me as to where i could go for a tutorial or a way of going to create a demo license for this program, After a week it will stop working. Then i will give him the full version..
Need this urgent have to meet client in 3 hours.
Don't give me code just point me in the right direction, This will come handy in my future programs :D
Re: Java licensing system URGENT
nobody culd help so i did a dodgy trial system for now..
Code :
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
import javax.swing.JOptionPane;
public class license {
public static boolean Expired;
public license() throws Exception{
FileReader file;
try {
file = new FileReader("AD Converter/temp/comp.txt");
Scanner scan = new Scanner(file);
String licno = scan.next();
Integer.parseInt(licno);
int tempOut = Integer.parseInt(licno);
tempOut = tempOut - 1;
if(Integer.parseInt(licno) <= 0){
JOptionPane.showMessageDialog(null, "Sorry, Your trial has expired. Please purchase the product for unlimited use!");
Expired = true;
}
else if(Integer.parseInt(licno) <= 40){
JOptionPane.showMessageDialog(null, "You current have: " + licno + " uses left.");
PrintWriter out = new PrintWriter(new FileWriter("AD Converter/temp/comp.txt"));
System.out.println(tempOut + " Value");
out.print(tempOut);
Expired = false;
out.close();
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}