title: clojure gen-class returning own class
body: <p>I'm now making a class object with Clojure which has a method returning the object itself.</p>
  
  <p>Written with Java, the object that I'd like to make is like,</p>
  
  <pre><code>class Point {
      public double x;
      public double y;
  
      public Point(double x, double y) {
          this.x = x;
          this.y = y;
      }
  
      public Point copy() {
          return new Point(this.x, this.y);
      }
  }
  </code></pre>
  
  <p>The current clojure code that I wrote is like,</p>
  
  <pre><code>(ns myclass.Point
    :gen-class
    :prefix "point-"
    :init init
    :state state
    :constructors {[double double] []}
    :methods [[copy [] myclass.Point]]))
  
  (defn point-init [x y]
     [[] {:x x :y y}])
  
  (defn point-copy [this]
     this)
  </code></pre>
  
  <p>However, I got an error as follows.</p>
  
  <pre><code>java.lang.ClassNotFoundException: myclass.Point
  </code></pre>
  
  <p>While I have googled about this issue, I couldn't find any answers. Does anyone know the solution for this issue?</p>
  
  <p>Thank you in advance for your help.</p>