title: Error when using Java Class in Python with Jpype
body: <p>I am trying to use a Java Class from the <a href="http://webgraph.di.unimi.it" rel="nofollow noreferrer"><em>webgraph</em></a> library in a python script, using jpype. I am able to import the class but I can't instantiate it. This is my code:</p>
  
  <pre><code>...
  ####
  
  import jpype
  from jpype import *
  import os
  
  path_to_jar = os.path.join(os.getcwd(), "webgraph")
  classpath = ':'.join(
      [os.path.join(path_to_jar, name) for name in os.listdir(path_to_jar)])
  jpype.startJVM(jpype.getDefaultJVMPath(), "-ea",
                 "-Djava.class.path={}".format(classpath))
  ImmutableGraph = JClass('it.unimi.dsi.webgraph.ImmutableGraph')
  im = ImmutableGraph.load("graphs/cnr-2000")
  ...
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>&lt;class 'jpype._jclass.it.unimi.dsi.webgraph.ImmutableGraph$$Static'&gt;
  Traceback (most recent call last):
    File "breadth_first_raw.py", line 34, in &lt;module&gt;
      im = ImmutableGraph.load("graphs/cnr-2000")
  RuntimeError: No matching overloads found for load in find. at native/common/jp_method.cpp:127
  </code></pre>
  
  <p>Looking at the source code in <a href="http://webgraph.di.unimi.it" rel="nofollow noreferrer"><em>webgraph</em></a>, it seems the constructor is expecting a <em>CharSequence</em>. The method <em>load</em> can be seen on line 524 in <a href="https://github.com/lhelwerd/WebGraph/blob/master/src/it/unimi/dsi/webgraph/ImmutableGraph.java" rel="nofollow noreferrer">this file</a> </p>
  
  <pre><code>/** Creates a new {@link ImmutableGraph} by loading a graph file from disk to memory, with 
   *  all offsets, using no progress logger.
   * 
   * &lt;P&gt;This method uses the properties convention described in the {@linkplain ImmutableGraph introduction}.
   *
   * @param basename the basename of the graph.
   * @return an {@link ImmutableGraph} containing the specified graph.
   * @throws IOException if an I/O exception occurs while reading the graph.
   */
  
  
  public static ImmutableGraph load( CharSequence basename ) throws IOException {
      return load( LoadMethod.STANDARD, basename, null );
  }
  </code></pre>
  
  <p>I don't know exactly what is causing the error. I thought the argument of the <em>load</em> function could be in the wrong format, thus I tried to use <code>JString("graphs/cnr-2000")</code> but it didn't work neither. Is it possible there's something wrong with the path I'm using? 
  My directory tree is the following</p>
  
  <pre><code>.
  ├── __init__.py
  ├── my_script.py
  ├── graphs
  │   ├── cnr-2000.graph
  │   ├── cnr-2000.md5sums
  │   ├── cnr-2000.obl
  │   ├── cnr-2000.offsets
  │   └── cnr-2000.properties
  └── webgraph
      ├── all_jars* 
      ..
  </code></pre>