0

I was trying to use Eclipse for a small java code,

        try {
        Scanner sc = new Scanner( new File("H:\\CS111\\HW\\HW1\\grades(1).csv"));
        Student[] students = new Student[10];
        int counter = 0;
        while ( sc.hasNext ()){
            String a = sc.nextLine();
            String [] arr = a.split(", ");
            System.out.println(Arrays.deepToString(arr));
            int [] grades = new int[10];
            int stdNum = Integer.parseInt(arr[0]);
            for( int i = 1 ; i < arr.length; i++){
                int value = Integer.parseInt( arr[i]);
                System.out.println(value);
                grades[i-1] = value;
            }
            Student s = new Student( stdNum, grades);
            students[counter] = s;
            counter++;
            System.out.println(Arrays.toString(grades));

        }

        PrintWriter p = new PrintWriter( "abc.txt");
        p.write("Hello");
        p.close();
        sc.close(); 

        }catch( FileNotFoundException e){
        }

    }

  }

and I am getting the Unhandled event loop exception, following are part of log errors:

  org.eclipse.swt.SWTError: No more handles
    at org.eclipse.swt.SWT.error(SWT.java:4517)
    at org.eclipse.swt.SWT.error(SWT.java:4406)
    at org.eclipse.swt.SWT.error(SWT.java:4377)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:482)
    at org.eclipse.swt.widgets.Control.createHandle(Control.java:703)
    at org.eclipse.swt.widgets.Label.createHandle(Label.java:199)
    at org.eclipse.swt.widgets.Control.createWidget(Control.java:743)

Could some one help with this?

Madhan
  • 5,750
  • 4
  • 28
  • 61
  • What is your eclipse version? – XOR-Manik Jun 30 '15 at 17:34
  • Try using Eclipse Luna and Refer [this](https://bugs.eclipse.org/bugs/show_bug.cgi?id=402983) and [this](http://stackoverflow.com/questions/2018553/swt-no-more-handles) – Madhan Jun 30 '15 at 19:57

0 Answers0