make(java): Migrate samples to maven (#202)
- Factorise makefile code using advanced make function - Use the Loader in samples
This commit is contained in:
@@ -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.IntVar;
|
||||
import com.google.ortools.sat.IntervalVar;
|
||||
@@ -20,11 +21,8 @@ import com.google.ortools.sat.Literal;
|
||||
|
||||
/** Code sample to demonstrates how to build an optional interval. */
|
||||
public class OptionalIntervalSampleSat {
|
||||
static {
|
||||
System.loadLibrary("jniortools");
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
Loader.loadNativeLibraries();
|
||||
CpModel model = new CpModel();
|
||||
int horizon = 100;
|
||||
IntVar startVar = model.newIntVar(0, horizon, "start");
|
||||
|
||||
Reference in New Issue
Block a user