make(java): Migrate samples to maven (#202)

- Factorise makefile code using advanced make function
- Use the Loader in samples
This commit is contained in:
Mizux Seiha
2020-09-11 03:07:18 +02:00
parent d84ec17e81
commit c6420ba8e6
48 changed files with 146 additions and 249 deletions

View File

@@ -13,6 +13,7 @@
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.CpSolverStatus;
@@ -20,11 +21,8 @@ import com.google.ortools.sat.IntVar;
/** Solves a problem with a time limit. */
public class SolveWithTimeLimitSampleSat {
static {
System.loadLibrary("jniortools");
}
public static void main(String[] args) throws Exception {
Loader.loadNativeLibraries();
// Create the model.
CpModel model = new CpModel();
// Create the variables.