How to Download & Install Kotlin Compiler & Setup & Run Kotlin in VSCode Full Tutorial For Beginners
Feb 19, 2025
Get the full source code of application here: Hi Join the official discord server to resolve doubts here: https://discord.gg/cRnjhk6nzW Visit my Online Free Media Tool Website https://freemediatools.com/ Buy Premium Scripts and Apps Here: https://procodestore.com/
View Video Transcript
0:00
uh hello guys welcome to this video so
0:02
in this video I will show you how to fix
0:05
this error message which comes if you
0:07
just write qulin on the command line if
0:10
it shows this message that cotlin is not
0:12
recognized as an internal or external
0:14
command so 99% of the time you haven't
0:17
installed cotlin so I will show you in
0:21
this video how to install cotlin
0:23
manually the compiler and you can use it
0:27
cotlin to compile your program so for
0:30
for this you need to write Google
0:33
scotline
0:35
compiler download so the very first
0:39
website link which comes this is their
0:40
official website Klink language. org
0:44
simply click on that cot link command
0:46
line compiler and here you need to go to
0:49
the GitHub releases section and just
0:52
manually download the cotlin compiler we
0:56
drag down and you will see it for
0:57
Windows here this will be the zip file
1:00
simply click and it is available for
1:03
Linux Mac as well so based upon your
1:05
operating system simply click that and
1:08
it's almost this ZIP file is 82.4
1:12
megabytes simply start the download
1:15
after you download this you will see now
1:17
we just need to extract the content so
1:20
just extract the content here and after
1:24
extracting it it will create this folder
1:26
codlin
1:28
compiler and and
1:31
uh you will now see now we have this
1:34
cotlin
1:35
compiler so what I will do is that I
1:38
will simply cut this folder from here
1:42
and just go to my C drive and inside
1:45
this we will have this program files and
1:48
here I will paste this
1:50
folder simply paste the whole
1:53
content so here it you pasted this
1:56
folder cotlin compiler so it is present
1:59
in my program files if you go to the bin
2:02
folder so now in the bin folder we see
2:05
these binaries executables present so
2:08
this is your cotlin compiler so if you
2:10
open the command line here and type the
2:12
command cotlin compiler so now if you
2:16
see the cotlin compiler command you can
2:18
see welcome to cotlin version
2:21
2.1.10 so in this way you can now
2:25
compile your programs this is the cotlin
2:28
compiler
2:31
you can put the version here so which
2:37
is can just say help and it will give
2:41
you all the commands which this coton
2:43
compiler supports so now if you want to
2:46
enable it globally what you need to do
2:48
is that you need to right click copy
2:50
this path and go to your environment
2:53
variable and uh
2:55
just go to the system variable right
2:58
here and just go to the
3:01
path and click edit and new and simply
3:05
paste this address C program files
3:08
Scotland compiler bin and just click
3:11
okay okay and just after restarting the
3:14
terminal just execute the same command
3:16
cotlin compiler so now if you see that
3:19
basically we are here in the cotlin
3:22
version cotlin compiler so in this way
3:24
you can manually install cotlin that I
3:26
showed you step by step in this video
3:29
and make sure that you add the full path
3:31
in the environment variable so that you
3:33
can access this command globally inside
3:35
your system so in this way guys you can
3:38
install the cotlin compiler and uh using
3:42
this approach so thank you very much
3:45
guys for watching this video and now you
3:49
can even create a very basic cotland
3:52
program let me also show you how to do
3:56
that as well before exiting this Pro so
4:00
let me go to my vs code and show to you
4:03
so make cotland
4:07
program and let me go to
4:12
this open it inside my vs code so here I
4:16
will simply create a cotlin
4:20
file let me create uh main. KT KT is
4:24
actually the extension of cotlin so you
4:27
create this file and I I just need to
4:31
paste a very simple program of cotlin
4:34
which will print out the message hello
4:41
world let me zoom
4:46
out so we paste this you will see that
4:49
and for vs code I think there is an
4:51
extension that you can install for
4:53
cotlin especially if you are doing
4:54
cotlin development there is an extension
4:57
if you just type cotlin uh there will be
5:00
this autoc completion features so just
5:03
it is developed almost 1 million
5:06
downloads so simply install it it
5:10
provides you with the auto
5:12
completion and debugging as well so
5:15
install this as soon as you do this you
5:18
will see that now it is recognizable
5:20
this Scotland code so can see that the
5:24
auto completion will also be there
5:36
so after this if you want to run this we
5:40
simply execute this command so go to
5:44
your right here so here we replace the
5:47
name of the file which is main.
5:50
KT so here we need to convert this
5:53
cotlin file to the jar file so that we
5:55
can run this file so if you execute this
5:58
compiler you're using using this cotlin
6:00
compiler right here so it is now
6:03
converting this cotlin file to jar file
6:05
so if you see that it has created this
6:08
jar file hello.
6:11
jar
6:12
so can see that this jar file has been
6:15
created now you can run this jar file
6:18
using the Java compiler so it's very
6:22
simple how we do this so it's available
6:26
in this
6:27
documentation so make sure that you do
6:30
have Java installed I already have Java
6:32
installed on my machine so if I show you
6:36
we are using the Java
6:38
23.0.2 so make sure that you have Java
6:41
installed and now you can run this jar
6:43
file by simply typing this command Java
6:47
DJ hello. J which print outs the message
6:51
hello world so in this easy way guys you
6:54
can compile your cotlin programs to jar
6:57
files and then run it using Java so it's
7:00
a complete setup video that I showed you
7:02
for vs code first of all we looked at
7:05
how to install cotlin and register it
7:07
inside environment variable and also we
7:09
run a simple program in vs code so in
7:13
this way you can run this program and if
7:16
you like this video again please hit
7:17
that like button subscribe the channel
7:19
as well and also check out my website as
7:22
well free media tools.com uh which
7:25
contains thousands of tools regarding
7:27
audio video and image and and I will be
7:30
seeing you guys in the next video
#Computer Education
#Programming