Link to home
Start Free TrialLog in
Avatar of lcor
lcor

asked on

Jndi ldap libs not found with jdk 1.6

I am trying to get some legacy code working.  I am using Netbeans ide which has the JDK 1.6.

The legacy code uses the following:

import com.sun.jndi.ldap.ctl.ProxiedAuthorizationControl;
import com.sun.jndi.ldap.ctl.SortControl;

Netbeans is reporting that these classes can't be found.  I submitted a previous Expert Exchange question and a response was that com.sun.jndi.ldap.* is standard starting with jdk 1.4.  So, why can't these libaries be found?
ASKER CERTIFIED SOLUTION
Avatar of javaexperto
javaexperto
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
if you look into the rt.jar of a jdk >=1.4.2 there aren't any packages com.sun.jndi.ldap.ctl.*.  

Like object said you shouldn't use the com.sun-classes directly, because this is not a stable api. instead you should use javax.naming.*. look here ... http://java.sun.com/products/jndi/tutorial/ldap/security/ldap.html

Avatar of lcor
lcor

ASKER

javaexperto,

I downloaded j2re1.4.1_01 and I still can't find

import com.sun.jndi.ldap.ctl.SortControl;

I did a "jar tvf rt.jar" in j2re1.4.1_01\lib.  

My constraint is that I can't use the separate jndi package.   Directions and constraints given to me were that these libs should work with jdk1.4.x but I'm finding this not to be the case and would appreciate help in confirming or not the case..



cdittberner,

I looked in jdk1.4.x's rt.jar and I can't locate the two classees...

I have to get the legacy code functioning even if the lib is unstable.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial