You can fiddle with it a bit in different environments, but this is the rundown from what I remember:
MQ 5.2 + MQLSX + R5 - Supported until 12/31/2004
MQ 5.2 + Java + R5 - Doesn't work (MQ Java requires JVM 1.3.1 or later; R5 only supports up through 1.1.8).
MQ 5.3 + MQLSX + R5 - Not sure if this is supported, but it does work (see note below about re-installing mqlsx.dll)
MQ 5.3 + MQLSX + D6 - Unsupported, but it works ( you can get the mqlsx.dll file from a 5.2 install and drop it in the ..\bin directory of a 5.3 install, and it will work).
MQ 5.3 + Java + D6 - Works and supported.