0

My library has dependency on org.ietf.jgss package which is not included in the android.jar.

I added jndi.jar for javax.naming package(also missed in the android) but couldn't find the jar for the org.ietf.jgss.

I repackaged the jar from rt.jar(JDK1.5) following instruction from http://code.google.com/p/dalvik/wiki/JavaxPackages.

But the repackaged jar's file size is quite big(14mb) and I am not sure that is the only way to deal with missing APIs.

There are number of packages that are missed from common JDK. Are there any documents that describes how to deal with each missing API.

Any help would be appreciated.

Many thanks.

tompal18
  • 1,164
  • 2
  • 21
  • 39

1 Answers1

0

I added jndi.jar for javax.naming package(also missed in the android) but couldn't find the jar for the org.ietf.jgss.

You should be obtaining all of this code from Apache Harmony.

I repackaged the jar from rt.jar(JDK1.5) following instruction from http://code.google.com/p/dalvik/wiki/JavaxPackages.

That is unlikely to work. It is also a license violation for the Sun/Oracle code you are using this way.

Are there any documents that describes how to deal with each missing API.

No. Generally, you shouldn't be using them.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • "Apache Harmony is retired at the Apache Software Foundation since Nov 16, 2011." (http://harmony.apache.org/) Is there any currently supported solution to this problem? – narduk Jun 18 '14 at 23:53
  • @narduk: The best approach is to find some alternative to `org.ietf.jgss`. The next-best approach is to publish your app under the GPL and use the Oracle code. The next-next-best approach is to use the retired code, which AFAIK is still available, just no longer maintained. – CommonsWare Jun 19 '14 at 00:13