-1

I am facing problem with some packages like Javax, when i am trying to import the following packages in my android applications!

Javax.naming.Naming.Exception; 
Javax.naming.directory.DirContext;
Javax.naming.directory.InitialDirContext;

 private DirContext connectLDAP()
    throws NamingException
 {
    Properties localProperties = new Properties();
    localProperties.setProperty("java.naming.factory.initial", LDAP_PROVIDER);
    localProperties.setProperty("java.naming.batchsize", "0");
    localProperties.setProperty("java.naming.provider.url", this.params.getLdapURL());
    localProperties.setProperty("java.naming.factory.url.pkgs", "com.sun.jndi.url");
    localProperties.setProperty("java.naming.referral", REFERRALS_IGNORE);
    localProperties.setProperty("java.naming.security.authentication", "none");
    return new InitialDirContext(localProperties);
}

help me to resolve this problem.

VMAtm
  • 27,943
  • 17
  • 79
  • 125

1 Answers1

2

The classes that you are trying to use are not part of the Android SDK. You will need to find some other solution for whatever problem it is that you are trying to solve.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I thought so but this(http://www.zdnet.com/article/java-vs-android-apis/) made me confused. And I've also seen many people who were using javax.sound on Android.. I don't understand how and why. – Jenix Feb 23 '16 at 20:19
  • 1
    @JenixGuy: "made me confused" -- that is an eight-year-old article, and there has been some shifting since then (e.g., we have a tiny slice of `java.beans` now). I don't recall `javax.sound` ever being in Android. – CommonsWare Feb 23 '16 at 20:45
  • Aha! Thanks for the clarification, now I got it! – Jenix Feb 23 '16 at 22:24