Ship in a Bottle (Star Trek: The Next Generation)

"Ship in a Bottle"
Star Trek: The Next Generation episode
Episode no.Season 6
Episode 12
Directed byAlexander Singer
Written byRené Echevarria
Production code238
Original air dateJanuary 24, 1993 (1993-01-24)
Guest appearances

"Ship in a Bottle" is the 138th episode of the American science fiction television series Star Trek: The Next Generation, the 12th episode of the sixth season.

Set in the 24th century, the series follows the adventures of the Starfleet crew of the Federation starship Enterprise-D. This episode features the holodeck, a technology that creates immersive simulated environments, and sees the return of the character James Moriarty from the second-season episode "Elementary, Dear Data"—a holodeck simulation of the Sherlock Holmes villain Professor Moriarty who has gained self-awareness and seeks to exist in the real world, outside the confines of the holodeck.