You should get an exception if there is a problem if there is no problem than it maybe that this is taking very long...is the db server on the same machine...seems like it from the url. You can try exchanging localhost with 127.0.0.1 and trying that I had an experience like that with an older driver as far as I can remember. I think your driver is not the latest I think 15 is the latest. Check MySQL.com that would be the best place for the JVM version question as well, even though I think it should work.
You should also try a "dry test" no java just calling up mysql and connection with the same credentials, also check if mysql is running and listening.
Please please please do not use SMS in your CODE examples! It's just terrible. Javaranch is not charging you the use of this forum by the letter and it makes your code difficult to read.
Now as to your problem. What do you mean hang? Forever? Or just awhile? There are alot of possibilities of what could be happening many of the network related difficulties.
It would be nice to see your real code because for various and sundry reasons what you posted is not it. It would also be nice to see an error message... or perhaps you are eating it in an empty catch block. Please post your actual real code and any error messages you are getting.