I am getting
Exception in thread \"main\" java.lang.ArrayIndexOutOfBoundsException: 0 at com.ibm.icu.text.BreakDictionary.main(BreakDictionary.java:40) <
Exception in thread \"main\" java.lang.ArrayIndexOutOfBoundsException: 0 at com.ibm.icu.text.BreakDictionary.main(BreakDictionary.java:40)
You are running the main method of BreakDictionary. In other words: you are running a completely different program and not the code you posted.
main
BreakDictionary