Although you could use java, I would recommend using flash as the front end for your game, and php to handle any data driven events when necessary (ie: post backs to the server to get user info or whatever you are planning)
I was involved in the development of a game doing just that (on the php side) It works quite nicely.
Java would be cool too, but java is much harder to make look nice. Flash is very good for quick graphics which you would want in a game.
Hope that helps.