When building a Java projekt with j2objc
in command line, I specify all needed dependencies JARs with the -classpath
attribute, e.g.: httpclient-4.4.1.jar or others.
This works for all dependencies except classes from namespace javax.*
(e.g. javax.xml) I can't specify since I don't know in which package they are.
How would I link the javax.*
JAR - which are part of JRE itself, if I'm right? Running the exact same command with javac
compiles fine without warnings.
J2ObjC's JRE emulation library is heavily based on Android's libcore library. If you look at the Android API, you'll see that none of missing classes are available on Android. That means you'll need to find the source for these classes, and build them on both platforms.
Another option (since the Android team apparently doesn't think these classes should be on mobile devices) is to keep the logic that uses these classes on the server, and have the mobile devices send the input to the server and get output from it.