Arduino lightgun interfacing with Java

Wont it depend on what type of screen your using and it's refresh rate. I think you need to know very accurately just were the raster scan of the electron beam (or what ever the modern equivalent of that is, if it even works the same) .. Is this how it work's or am i thinking of an old style light pen. I reckon it's got to be similar. Surely most of the work is going to be in the computer side of things. I doubt you could do it in java i could be wrong. I would think it's very platform dependent what with there been so many different types of monitors and graphics card setups. You would be better of hacking a Kinetic or something