I am getting
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at com.ibm.icu.text.BreakDictionary.main(BreakDictionary.java:40)
When I run/debug my SWT program in Eclipse. What might be causing this? When I put a breakpoint on the 1st line of my main()
, it doesn't even seem to run till that point.
UPDATE
Even in a new SWT project, with a Application Window created from the template, without any changes, the error still occurs ...
If you want to see the code, http://pastie.org/3547493 (its whats generated from Eclipse with Google Window Builder Pro plugin)
You are running the main
method of BreakDictionary
. In other words: you are running a completely different program and not the code you posted.
In order to be sure that you are not running a different method from the dictionary class, you should right click on your class and run it as a Java application.
来源:https://stackoverflow.com/questions/9615352/arrayindexoutofboundsexception-in-com-ibm-icu-text-breakdictionary-main-in-swt-a