title: run java class in octave
body: <p>I'm trying to call java object in Octave. For example, here's my java code (square class):</p>
  
  <pre><code>public class square {
  
      private int x;
      private int y;
  
      public square(int x, int y)
      {
          this.x = x;
          this.y = y;
      }
  
      public double s()
      {
          return x*y;
      }
  }
  </code></pre>
  
  <p>And my main class:</p>
  
  <pre><code>public class console {
  
      public static void main(String[] args) {
          System.out.println("Hello world!");
          square kv = new square(3, 4);
          double r = kv.s();
          System.out.println("result: " + r);
      }
  }
  </code></pre>
  
  <p>How can i call square class or console class in Octave? I've tried following which didn't work.
  I tried to create <code>javaclasspath</code> like <code>javaaddpath("C:\Users\User\Desktop\javaTest\console.jar")</code>. I also add in <code>javaclasspath.txt</code> paths such as <code>~\console.class, ~\console.java</code> and so on.</p>
  
  <p>In octave i tried to call object like <code>obj = javaObject("console")</code>  but i always get an error </p>
  
  <pre><code>error: [java] java.lang.ClassNotFoundException: console
  </code></pre>
  
  <p>Ofcourse i tried with various "console" parameters like "console.class", "console.java", "square", ...</p>