Using a URL as a Name to the Initial Context
import javax.naming.InitialContext; public class Main { public static void main(String[] argv) throws Exception { Object obj = new InitialContext().lookup("iiop://localhost/Sample"); } }