title: Java cannot access class, class file not found
body: <p>When I try to make a project in IntelliJ I receive the following error on this line:</p>
  
  <pre><code>Sentence sent = new Sentence();
   sent.emptySegments();
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Error:(151, 10) java: cannot access javax.xml.bind.RootElement
  class file for javax.xml.bind.RootElement not found
  </code></pre>
  
  <p><code>Sentence</code> is a class which implements the <code>RootElement</code> <strong>interface</strong></p>
  
  <pre><code>import javax.xml.bind.RootElement;
  ...
  public class Sentence extends MarshallableRootElement implements RootElement   {
  </code></pre>
  
  <p>All packages exist and I can jump to declaration of each interface or class but I don't know why IntellJ says it cannot access or find them? However <code>RootElement</code> is an interface and not a class</p>
  
  <pre><code>public interface RootElement extends Element {
      void validate() throws StructureValidationException;
  }
  </code></pre>
  
  <p>The above declaration is in a jar file named <code>jaxb-rt-1.0-ea.jar</code> and it exists in the Project librarians.</p>