nobody culd help so i did a dodgy trial system for now..
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();
}
}
}