title: Eclipse Oxygen Java giving empty error
body: <p>I have some Java that, in theory, draws a line from the top left corner to the bottom right corner of the 500x500 window. The code:</p>
  
  <pre><code>import javax.swing.JComponent;
  import javax.swing.JFrame;
  
  import java.awt.*;
  import java.awt.geom.*;
  
  @SuppressWarnings("serial")
  
  public class graphix extends JFrame{
  
      public static void main(String[] args){
  
          new graphix();
      }
  
      public graphix(){
  
          this.setSize(500, 500);
  
          this.setTitle("Title Here");
  
          this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
          this.add(new Draw(), BorderLayout.CENTER);
  
          this.setVisible(true);
  
      }
  
  
      private class Draw extends JComponent{
  
          public void paint(Graphics g){
  
              Graphics2D graph2 = (Graphics2D)g;
  
              graph2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
  
              Shape drawLine = new Line2D.Float(10, 10, 490, 490);
  
              graph2.setPaint(Color.BLACK);
  
              graph2.draw(drawLine);
  
          }
  
      }
  
  }
  </code></pre>
  
  <p>When i run this code, eclipse gives me the error:</p>
  
  <pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
  
  at graphix.graphix.main(graphix.java:11)
  </code></pre>
  
  <p>normally in eclipse, the error message will be displayed in the empty space between those two lines, but it says the error is triggered at line 11, which is </p>
  
  <pre><code>public static void main(String[] args){
  </code></pre>
  
  <p>My project name is graphix, and the class file name is graphix.java</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>There is also a non-fatal error:</p>
  
  <pre><code>The declared package "" does not match the expected package "graphix"
  </code></pre>
  
  <p>triggered by:</p>
  
  <pre><code>import javax.swing.JComponent;
  </code></pre>