make(java): Migrate samples to maven (#202)
- Factorise makefile code using advanced make function - Use the Loader in samples
This commit is contained in:
@@ -16,6 +16,7 @@ package com.google.ortools.constraintsolver.samples;
|
||||
// [START import]
|
||||
import static java.lang.Math.abs;
|
||||
|
||||
import com.google.ortools.Loader;
|
||||
import com.google.ortools.constraintsolver.Assignment;
|
||||
import com.google.ortools.constraintsolver.FirstSolutionStrategy;
|
||||
import com.google.ortools.constraintsolver.RoutingIndexManager;
|
||||
@@ -27,13 +28,10 @@ import java.util.logging.Logger;
|
||||
|
||||
/** Minimal Routing example to showcase calling the solver.*/
|
||||
public class SimpleRoutingProgram {
|
||||
static {
|
||||
System.loadLibrary("jniortools");
|
||||
}
|
||||
|
||||
private static final Logger logger = Logger.getLogger(SimpleRoutingProgram.class.getName());
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
Loader.loadNativeLibraries();
|
||||
// Instantiate the data problem.
|
||||
// [START data]
|
||||
final int numLocation = 5;
|
||||
|
||||
Reference in New Issue
Block a user