gurobi.GRBException: No Gurobi license found

Viewed 4342

I'm recently using gurobi(java) in eclipse, I'm sure I have successfully got a license and everything was fine when I used gurobi to solve LP problems like that:

public LP(int n, int[]s, int[][]b) throws GRBException
{
    ...
    env = new GRBEnv("LPRelaxation.log");
    model = new GRBModel(env);
}

Then I added a QP part to my program and the error occurs:

public QP() throws GRBException
{
    env = new GRBEnv("LPRelaxation.log");
    model = new GRBModel(env);
}

The error:

Exception in thread "main" gurobi.GRBException: No Gurobi license found (user asus, host OWEN-ASUS, hostid fccf6a77)
at gurobi.GRBEnv.<init>(GRBEnv.java:20)
at methods.QP.<init>(QP.java:16)
....
1 Answers
Related