在jdk1.3中的src.jar中(用winzip解开)就有。

解决方案 »

  1.   

    Dureek(普博) 老大,呵呵,现在用webshpere,db2`
      

  2.   

    lmy2000(pluto)老大,没有这个包啊,说详细点好吗
      

  3.   

    老大, 那包基本是一堆接口, 属于JNDI(rt.jar里面可以找到). 它用Factory的方式来创建Context, 你需要提供些信息(可以在System.properties里, 也可以是个配置文件), 你可以参考下面的配置文件(jndiprovider.properties):
    # Provider resource file for the LDAP service provider.# Factory for the response controls supported by this release.
    java.naming.factory.control=com.sun.jndi.ldap.ctl.ResponseControlFactory# AttrsToCorba: Turn entry with corbaObject objectclass into a org.omg.CORBA.Object
    # MarshalledToObject: Turn entry with javaMarshalledObject into UnmarshalledObject
    java.naming.factory.object=com.sun.jndi.ldap.obj.AttrsToCorba:com.sun.jndi.ldap.obj.MarshalledToObject# RemoteToAttrs: Turn RMI/JRMP and RMI/IIOP object into javaMarshalledObject or
    #  corbaObject LDAP entry
    # CorbaToAttrs: Turn CORBA object into corbaObject LDAP entry
    # RemoteToCorbaToAttrs: Turn RMI/IIOP object into corbaObject LDAP entry. 
    #  Note that there is no need to specify this in list unless RemoteToAttrs is
    #  removed because RemotetoAttrs already handles this case
    java.naming.factory.state=com.sun.jndi.ldap.obj.RemoteToAttrs:com.sun.jndi.ldap.obj.CorbaToAttrs如果你的程序里需要名字服务, 那你至少得先知道provider什么的, 不知道websphere有没有类似的properties文件, 找找看, 100%有 :)
      

  4.   

    还有例子(取自j2eesdk1.3里JMS的client配置):
    #comments jms properties file
    com.sun.jms.internal.java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory
    com.sun.jms.internal.java.naming.provider.url=com.sun.jms.client.transport_preference=IIOP#Possible values are SEVERE,WARNING,INFO, FINE, FINER, FINEST.
    com.sun.jms.default.loglevel=WARNING
    第一个一定要有哦~ 在你new一个InitialContext的时候, 它自己会去找相关信息的 :)
    如果还不行, 你就去sun看看JNDI方面的资料吧 ...* 老大, 好消息, 我终于成功的打入了敌人的内部, 呵呵 ...
      

  5.   

    还有, 老大, 你怎么不上oicq了呢? 现在在做什么啊?
      

  6.   

    老大,我一直在oicq上啊, 2807377
      

  7.   

    老大, 我只有晚上回家才能开oicq啊, faint ...
    wM+08ywgztLV4rb5tcS087DR18rBz9T1w7SyxcTcuPjE48TYPw==;]