make(java): Migrate samples to maven (#202)
- Factorise makefile code using advanced make function - Use the Loader in samples
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
// [START program]
|
||||
package com.google.ortools.sat.samples;
|
||||
|
||||
import com.google.ortools.Loader;
|
||||
import com.google.ortools.sat.CpModel;
|
||||
import com.google.ortools.sat.CpSolver;
|
||||
import com.google.ortools.sat.CpSolverSolutionCallback;
|
||||
@@ -22,11 +23,8 @@ import com.google.ortools.sat.LinearExpr;
|
||||
|
||||
/** Minimal CP-SAT example to showcase calling the solver. */
|
||||
public class SolutionHintingSampleSat {
|
||||
static {
|
||||
System.loadLibrary("jniortools");
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
Loader.loadNativeLibraries();
|
||||
// Create the model.
|
||||
// [START model]
|
||||
CpModel model = new CpModel();
|
||||
|
||||
Reference in New Issue
Block a user