title: class constructor cannot be accessed by outside package
body: <p>so i can't find a question already asked that answers my exact problem. I have a package that i wrote in eclipse that i exported as a jar library to use in the processing ide. in processing i have a sketch that has a class that calls a class that is in the package. when i try to compile i get this error:   </p>
  
  <pre><code>Pirate(processing.core.PApplet,java.lang.String,processing.core.PVector,float,float,int,int) is not public in fsg.pvzclone.pirateunits.Pirate; cannot be accessed from outside package
  [javac]   fsg.pvzclone.pirateunits.Pirate pirate1 = new fsg.pvzclone.pirateunits.Pirate(this, "Pirate", pinPoint, pWidth, pHeight, 1, 1).displayPirate();
  </code></pre>
  
  <p>does anyone know why i can't access the class? I have both the class and constructor set as <code>public</code>, so i'm not sure why the class can't be accessed. any help would be greatly appreciated.</p>
  
  <p><strong>CONSTRUCTOR CODE:</strong></p>
  
  <pre><code>package fsg.pvzclone.pirateunits;
  
  import processing.core.*;
  
  public class Pirate {
     public String pirateClass;
      int classId;
      PVector pinPoint;
      float width;
      float height;
      int id;
      PApplet parent;
  
      public Pirate(processing.core.PApplet _parent, String _pirateClass, PVector _pinPoint,
          float _width, float _height, int _classId, int _id) {
          parent = _parent;
          pirateClass = _pirateClass;
          classId = _classId;
          width = _width;
          height = _height;
          pinPoint = _pinPoint;
          id = _id;
      }
  
      public void displayPirate() {
          parent.fill(13, 183, 20, 255);
          parent.stroke(7, 59, 9, 255);
          parent.rect(this.pinPoint.x-this.width/2, (float)(this.pinPoint.y-this.height*.75), this.width, this.height);
      }
  
  }
  </code></pre>
  
  <p><strong>CODE CALLING PIRATE CLASS:</strong></p>
  
  <pre><code>fsg.pvzclone.pirateunits.Pirate pirate1 = new fsg.pvzclone.pirateunits.Pirate(this, "Pirate", pinPoint, pWidth, pHeight, 1, 1).displayPirate();
  </code></pre>