Which JDK for Kotlin development?

已回答

I am unsure which JDK I should install for Kotlin/JVM development.

Are there differences if I use 8 or 11?

Is the AdopOpenJDK sufficient or do I need an Oracle JDK?

0

Hello,

We can't tell for all the JDKs, it depends on the vendor, version, etc. But in general it's possible to use any JDK version.

 

0

I think AdoptOpenJDK is a specific vendor. Does Kotlin work the same with both JDK 8 and 11?

0

Also, IntelliJ does NOT come with an embedded JDK, right? Because I've had a few people claim that now.

0

Yes, Kotlin works with JDK 8 and 11. IDEA doesn't contain JDK, only custom JRE that is used to run itself.

0

Thank you very much!

0
Avatar
Permanently deleted user

On Windows 10 I've installed IntelliJ IDEA Community Edition and any Kotlin / JVM | IDEA project uses the Java JDK located at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.2\jbr. I don't find on my system any other JDK. Is it still true that IDEA doesn't contain JDK?

If I want to write only in Kotlin, is it not enough to install IDEA?

thanks and best

0

Hello,

IDE is provided either with JBR built-in and not, it depends on what you downloaded, if it has a JDK.

0
Avatar
Permanently deleted user

Hello, Liubov, and thanks for the immediate feedback.

Can you please solve the following doubts?

1. I've downloaded and installed IntelliJ IDEA Community Edition from https://www.jetbrains.com/idea/download/#section=windows and it seems to be enough to develop and run Kotlin project on Windows 10 without JDK installation, is it right?

2. If I use IDEA in which cases (operating systems, type of apps,...) do I have to donwload the JDK to write Kotlin program?

best

0

We are talking about 2 different JDKs here. IntelliJ IDEA contains a JDK to RUN ITSELF. When you create a Kotlin project, it should prompt you to provide a JDK to run your actual program. This is not embedded by default and has to be installed separately.

 

Check this video I made, it contains everything step by step:

https://www.youtube.com/watch?v=fwZyfudxnNo&ab_channel=CodinginFlow

0

At the moment we do not bundle any JDK for development and it's up to a user to install and configure JDK in IntelliJ IDEA when needed. Bundled JBR (JetBrains Runtime) used to run the IDE itself should not be used for development.

0
Avatar
Permanently deleted user

@flo, thank you, the 2019.2 IntelliJ doesn't prompt me for a JDK because in my installation it uses the JBR and it seems to work (at least for simple programs):

 

@serge, thank you now I've installed also a JDK from adoptopenjdk.

0

请先登录再写评论。