title: SCPSolver with Java nullPointerException. A runnable example
body: <p>I am trying to use some linear programming tools with Java. I decided to explore SCPSolver because it comes with a documentation.</p>
  
  <p>So I tried to run the example as shown in SCPSolver home page: <a href="http://scpsolver.org/" rel="nofollow">the low lever interface example</a></p>
  
  <pre><code>public class SCPSolverDemo {
    public static void main(String ag[]){
      LinearProgram lp = new LinearProgram(new double[]{5.0,10.0}); 
      lp.addConstraint(new LinearBiggerThanEqualsConstraint(new double[]{3.0,1.0}, 8.0, "c1")); 
      lp.addConstraint(new LinearBiggerThanEqualsConstraint(new double[]{0.0,4.0}, 4.0, "c2")); 
      lp.addConstraint(new LinearSmallerThanEqualsConstraint(new double[]{2.0,0.0}, 2.0, "c3")); 
      lp.setMinProblem(true); 
      LinearProgramSolver solver  = SolverFactory.newDefault();
      double[] sol = solver.solve(lp);
      System.out.println(Arrays.toString(sol)); //line 23
    }
  }
  </code></pre>
  
  <p>When I run it, i get an error message</p>
  
  <pre><code>Exception in thread "main" java.lang.NullPointerException
  at drafts.SCPSolverDemo.main(SCPSolverDemo.java:23)
  </code></pre>
  
  <p>I realized that <code>SolverFactory.newDefault();</code> retruns null. Documentation sais that</p>
  
  <p><em>Searches for service provider of the LinearProgramSolver service and returns the first instance it found. If no service was found, it prints the stack trace to stderr and returns null. When this method is first invoked, it initializes the ServiceLoader, which locates available services from the classpath. Subsequent calls use the result of this first initialization. Therefore, if there are no available services at the moment of the first call, there will be no available services for the rest of the program run. Future implementations might ignore this problem.</em></p>
  
  <p>but I don't know what to do to fix the problem. In this point, I would like your help. I cannot understand much from the existing example and I don't know what to do.</p>
  
  <p>Could somebody please give me a runnable example, in order to understand what is going on? Thank you in advance</p>