ILOG CPLEX 10.2 User's Manual > Programming Considerations > Licensing an Application > Examples > The registerLicense Method for Java Users

Here is an example for Java users applying IloCplex.registerLicense:

static String ilm_CPLEX_license=
"LICENSE ILOG Test\n RUNTIME CPLEX 9.200 021-Jul-2005 R81GM34ECZTS N  ,
options: m ";
static int ilm_CPLEX_license_signature=2756133;
 
public static void main(String[] args) {
 
   try {
      IloCplex.registerLicense(ilm_CPLEX_license, ilm_CPLEX_license_signature);
      IloCplex cplex = new IloCplex();
   }
   catch (IloException e) {
      System.err.println("Exception caught for runtime license:" + e);
   }
}