Within a year of taking over the St James's, Alexander began a mutually beneficial professional association with Oscar Wilde, whose "Lady Windermere's Fan" he presented in February 1892. The following year he produced Pinero's, "The Second Mrs Tanqueray", presented in May 1893. Like "Lady Windermere's Fan" it featured "a woman with a past", but unlike Wilde's play it ended in tragedy. It was thought daring at the time, but Alexander knew his audiences and kept to what Pearson called his "safe path of correct riskiness". It ran for 227 performances in its first production and was later much revived. The title role was first played by Mrs Patrick Campbell, who made her name in the part. Between Pinero's play and the work with which Alexander's name has become most closely associated – "The Importance of Being Earnest" – came Alexander's most conspicuous failure. The celebrated novelist Henry James had written a play, "Guy Domville", about a hero who renounces the priesthood to save his family by marrying to produce an heir, but finally reverts to his religious calling. The play had been turned down by one London management, but Alexander took it on and opened it at the St James's on 5 January 1895. It was received politely by those in the more expensive parts of the house and impolitely by those in the cheaper seats. The reviews were unenthusiastic; Alexander kept the play on the bill for a month before turning to Wilde as a more theatrically adept writer. In February 1895 Alexander presented Wilde's "The Importance of Being Earnest". The success of the play with audiences and critics was immediate and considerable, but it was short-lived. Within weeks of the premiere Wilde was arrested on a charge of committing homosexual acts and was tried, convicted and imprisoned. The public turned against him, and although Alexander tried to keep the production of the play going by removing the author's name from the playbills, he had to withdraw it after 83 performances. Under Alexander, the St James's did not solely concentrate on drawing-room comedy and society drama. There were costume dramas, including the Ruritanian swashbuckler, "The Prisoner of Zenda", which ran for 255 performances; and occasional ventures into Shakespeare, notably "As You Like It", with Alexander as Orlando, Julia Neilson as Rosalind and a supporting cast that included C. Aubrey Smith, Bertram Wallis, H. B. Irving, Robert Loraine and H. V. Esmond.