title: Exception while accessing the Excel file
body: <p>I am new to java, trying to write a program to access the data from the excel file. But getting message </p>
  
  <p>Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
      Cannot make a static reference to the non-static field</p>
  
  <p>Coding:</p>
  
  <pre><code>package xl;
  
  import java.io.File;
  import java.io.IOException;
  import java.util.Date;
  import jxl.*;
  import jxl.Workbook.*;
  import jxl.read.biff.BiffException;
  
  public class xl {
  
      public String path = "C:/Workbook.xls";
      public File wb = new File(path);
  
      public static void main(String[] args) throws IOException, BiffException {
          Workbook work;
          work = Workbook.getWorkbook(new java.io.File(wb));
  
          Sheet sheet1 = work.getSheet(0);
          Cell c1 = sheet1.getCell(0,0);
  
          String xreader = c1.getContents();
          System.out.println(xreader);
      }
  }
  </code></pre>
  
  <p>Any ideas, where i am wrong...</p>