Which standard library to use in Kotlin

0 votes
When using the JVM with Kotlin, it appears that there are several options for the standard library, including kotlin-stdlib, kotlin-stdlib-jdk7, and kotlin-stdlib-jdk8.

However, I can't seem to discover anything that explains how these differ from one another. With kotlin-stdlib, I am unable to use the com.fasterxml.jackson.data-bind.etc.MismatchedInputException, however I can with kotlin-stdlib-jdk8.

Can somebody explain this to me in clear English or point out the benefits of using one over the others?
Nov 18, 2022 in Kotlin by Tejashwini
• 3,820 points
542 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
The -jdk8 option should be used when utilizing the JDK8 as its name suggests. It contains the code necessary to incorporate the JDK 8 updates into the Kotlin standard library.

As its name says, it is dependent on -jdk7, which has the necessary code to incorporate the JDK 7 changes into the Kotlin standard library.
Additionally, it depends on the stdlib, as seen by the pom of the -jdk7.

Use the one that matches your JDK, in other words. It will transitively add all the dependencies for earlier JDK versions when it is added to the list of dependents.
answered Nov 24, 2022 by Ashwini
• 5,430 points

edited Mar 5

Related Questions In Kotlin

0 votes
0 answers

Accessibility implementation for Google Maps Marker in Android Kotlin

have to announce some customised content for ...READ MORE

Jun 22, 2022 in Kotlin by Harshitha
• 160 points
658 views
0 votes
0 answers

What is .indices meaning in kotlin?

I want to know actually how .indices ...READ MORE

Jun 22, 2022 in Kotlin by Harshitha
• 160 points
644 views
0 votes
0 answers

What's the difference between !! and ? in Kotlin?

Kotlin is new to me. What makes ...READ MORE

Nov 18, 2022 in Kotlin by Tejashwini
• 3,820 points
503 views
0 votes
0 answers

Call Kotlin suspend function in Java class

Assume we have the following function: suspend fun doSomething(): ...READ MORE

Nov 18, 2022 in Kotlin by Tejashwini
• 3,820 points
2,022 views
0 votes
0 answers

How to open link of Telegram group into Telegram app

I have a group link of Telegram. What I ...READ MORE

Jun 22, 2022 in Kotlin by Harshitha
• 160 points
3,185 views
0 votes
0 answers

What's the different between native-mt and normal kotlin coroutine lib?

When using a coroutine, we have the ...READ MORE

Nov 18, 2022 in Kotlin by Tejashwini
• 3,820 points
692 views
+1 vote
4 answers

Android - java or kotlin is better

If you are a newbie Android developer, ...READ MORE

answered Jan 22, 2020 in Career Counselling by Nayan
• 160 points
1,715 views
0 votes
0 answers
0 votes
0 answers

What does the suspend function mean in a Kotlin Coroutine?

I'm reading Kotlin Coroutine and know that ...READ MORE

May 26, 2022 in Others by Harshitha
• 120 points
500 views
0 votes
0 answers

Is there a maxheap in the C++ standard library?

I understand that the std::priority queue class ...READ MORE

Aug 11, 2022 in C++ by Nicholas
• 7,760 points
904 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP