# Okta java authn and sdk

**URL:** <https://devforum.okta.com/t/okta-java-authn-and-sdk/29449>\
**Category:** API\
**Tags:** java, authn\
**Created:** [July 18, 2024, 12:29pm UTC](https://devforum.okta.com/t/okta-java-authn-and-sdk/29449 "2024-07-18T12:29:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![liran](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@liran](https://devforum.okta.com/u/liran)\
**Post date:** [July 18, 2024, 12:29pm UTC](https://devforum.okta.com/t/okta-java-authn-and-sdk/29449/1 "2024-07-18T12:29:47Z")

</div>

We have a java SDK (okta-sdk-java), version 8.2.0 and auth sdk (okta-auth-java), version 2.0.7

Java SDK has been retired, and we’d like to upgrade to version 10.1.3.  
However, seems like auth (even the newest version, 3.0) still uses Java SDK 8.2.5.

This makes upgrading the Java SDK to 10.1.3 impossible. How can we work around that? Is there something we are missing?

---

<div class="post-metadata">

**Author:** ![krina234pestro](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@krina234pestro](https://devforum.okta.com/u/krina234pestro)\
**Post date:** [July 23, 2024, 6:32am UTC](https://devforum.okta.com/t/okta-java-authn-and-sdk/29449/2 "2024-07-23T06:32:51Z")

</div>

Hello,@liran

You can create a shadow JAR that bundles the necessary dependencies together, ensuring that there are no conflicts. This approach is more complex but can be effective for resolving deep dependency conflicts.

OR

You can exclude the older version of okta-sdk-java that okta-auth-java depends on and force the use of the newer version. This can be done in your pom.xml if you are using Maven, or in your build.gradle if you are using Gradle.   
com.okta.sdk  
okta-auth-java  
3.0.0  
  
  
com.okta.sdk  
okta-sdk-java  
  
  
  
  
com.okta.sdk  
okta-sdk-java  
10.1.3

The simplest and most common approach is using dependency exclusion to force the use of the newer SDK version. If this method does not resolve your issue, consider contacting Okta support for guidance or exploring more advanced options like shadow JARs or forking and modifying the SDK. more help…

---

<div class="post-metadata">

**Author:** ![liran](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@liran](https://devforum.okta.com/u/liran)\
**Post date:** [July 23, 2024, 12:26pm UTC](https://devforum.okta.com/t/okta-java-authn-and-sdk/29449/3 "2024-07-23T12:26:30Z")

</div>

Hi

Creating a single large JAR wouldn’t really work - I would need to run it in a different service, which I prefer to avoid.  
And I would also hate changing your code, even if it’s open sourced…  
Any other alternatives? Are you not aupporting the authn solution anymore?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [August 22, 2024, 12:26pm UTC](https://devforum.okta.com/t/okta-java-authn-and-sdk/29449/4 "2024-08-22T12:26:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
