title: what library I need so I can access this com.sun.image.codec.jpeg in Java?
body: <p>I'm creating an image watermarking program in java and I imported the followings:</p>
  
  <pre><code>import com.sun.image.codec.jpeg.JPEGCodec;
  import com.sun.image.codec.jpeg.JPEGEncodeParam;
  import com.sun.image.codec.jpeg.JPEGImageEncoder;
  </code></pre>
  
  <p>but I get an error that says:</p>
  
  <blockquote>
    <p>Access restriction: The type <code>JPEGCodec</code> is not accesible due to restriction on required library <code>C:\Program Files\Java\jre6\lib\rt.jar</code></p>
  </blockquote>
  
  <p>Does someone know a way to solve this, or what library should I add in order to access that and where I find that library?</p>