How do you plan to communicate between the NXT and the RCX? If you have a Mindsensors NRLink-Nx sensor, several ways of communicating are supported in the lejos.rcxcomm package, or you can use the RCXLink class directly.
The HiTechnic IRLink also supports communication with the RCX, but there is no current driver with leJOS for RCX communication with this. (There is a driver for driving Power Function Motors with it). If you wanted to use this, I could probably write a driver for you.
Of course there are other ways you could detect RCXs without communicating with them. You could use a camera, color sensor, sound sensor, IR signal detection (with an IR seeker sensor), etc.