title: I get "Exception in thread "main" java.lang.NoClassDefFoundError" while running sdkmanager from command line
body: <p>I am trying to insall cmdline-tools using sdkmanager from command line.</p>
  <pre><code>/path/to/sdkmanager --install &quot;cmdline-tools;latest&quot;
  </code></pre>
  <p>I get this error:</p>
  <pre><code>Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
      at com.android.repository.api.SchemaModule$SchemaModuleVersion.&lt;init&gt;(SchemaModule.java:156)
      at com.android.repository.api.SchemaModule.&lt;init&gt;(SchemaModule.java:75)
      at com.android.sdklib.repository.AndroidSdkHandler.&lt;clinit&gt;(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
  </code></pre>