Author | Message |
---|---|
afetiso
Posts: 84
|
Posted 16:21 Jan 20, 2014 |
try (BufferedReader in = new BufferedReader(new FileReader(getServletContext().getRealPath("/WEB-INF/Spanish.txt"))))
It shows NullPointerException after TRY? Can someone help? |
redge
Posts: 31
|
Posted 16:28 Jan 20, 2014 |
You're splitting on space characters, but in that text file, values are separated by tab characters. The impact this has on the resulting array is likely the cause of your NPE; try stepping through it with the Eclipse debugger.
|