FileDocCategorySizeDatePackage
Client_1.javaAPI DocExample867Sat Mar 06 09:49:28 GMT 1999com.titan.ship

Client_1

public class Client_1 extends Object

Fields Summary
Constructors Summary
Methods Summary
public static javax.naming.ContextgetInitialContext()


        Properties p = new Properties();
        // ... specify the JNDI properties specific to the vendor
        return new javax.naming.InitialContext(p);
    
public static voidmain(java.lang.String[] args)

        try{
            Context ctx = getInitialContext();
            ShipHome home = (ShipHome)ctx.lookup("ShipHome");

            Ship ship = home.create(1,"Paradise",3000,100000);
            int t = ship.getCapacity();
            System.out.println("Capacity = "+t);

        }catch(Exception e){e.printStackTrace();}