I guess that depends on your definition of "doesn't work." If you mean why doesn't it compile, it actually looks fine except that it's missing an import statement for BufferedReader. If you mean that it behaves differently than you expect, it would be helpful if you told us what you expect, and what happens instead.
Note that this program contains what I consider to be the most serious evil a Java programmer can commit: an empty catch block. If the parse fails, this will just hide the error and leave the user mystified; you need to print an error message in that catch block. Perhaps this empty catch is actually the source of the behavior you don't understand!