Address the judge directly as: "My
Lord" or "My Lady" or indirectly as "Your Lordship"
or "Your Ladyship".
When referring to real judges by name make sure you get their names correct.
Smith J. in speech is: "Mr Justice Smith" or, if a woman, "Mrs
Justice Smith". In speech "Smith J." or "Justice Smith"
is wrong.
If you know the name of the judge to whom you are writing, then you would address it to "Mr Justice ***" and the greeting on the letter would be "My Lord"
This link is very comprehensive on the matter:
http://www.judiciary.gov.uk/about_judiciary/forms_of_address/index.htmGood luck!