raphinesse commented on pull request #928:
URL: https://github.com/apache/cordova-android/pull/928#issuecomment-653569567
Here's the problem I encountered and still do when using Java > 8:
```
$ echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64
$ sdkmanager --version # same Exception for avdmanager and android
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/xml/bind/annotation/XmlSchema
at
com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at
com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at
com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at
com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException:
javax.xml.bind.annotation.XmlSchema
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more
$ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
$ sdkmanager --version
26.1.1
```
An explanation of the Exception can be found at
[stackoverflow](https://stackoverflow.com/q/46402772/380229). Unfortunately
there seems to be no workaround for Java 11. It might work with later Android
SDK tools. But I don't know what we support exactly.
This issue does not have to block this PR, since users should be able to use
latest JDK if it works for them and the SDKs they are using. But we should
maybe have an idea of what will and what will not work together, so we can
estimate the impact of allowing newer JDK versions and maybe warn users or
catch errors appropriately.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]