1 00:00:00,990 --> 00:00:01,920 ‫Instructor: Hi! 2 00:00:01,920 --> 00:00:05,400 ‫Within this lecture and within the following lectures, 3 00:00:05,400 --> 00:00:07,980 ‫we are going to set our computers up, 4 00:00:07,980 --> 00:00:12,570 ‫so that we can actually write Android code 5 00:00:12,570 --> 00:00:16,740 ‫and we're gonna have to download two softwares 6 00:00:16,740 --> 00:00:18,210 ‫in order to do that. 7 00:00:18,210 --> 00:00:20,940 ‫First of all, we are going to download something 8 00:00:20,940 --> 00:00:24,990 ‫called JDK, which is Java Development Kit, 9 00:00:24,990 --> 00:00:27,600 ‫and then we're going to download something called 10 00:00:27,600 --> 00:00:29,970 ‫Android Studio, which is a software 11 00:00:29,970 --> 00:00:33,390 ‫that we write our under Android codes in it. 12 00:00:33,390 --> 00:00:35,880 ‫And we are gonna have separate lectures 13 00:00:35,880 --> 00:00:38,490 ‫for Windows and for Macs. 14 00:00:38,490 --> 00:00:41,100 ‫So we're gonna start with Windows users. 15 00:00:41,100 --> 00:00:42,930 ‫So if you're a Mac user, 16 00:00:42,930 --> 00:00:47,910 ‫feel free to skip this video and just watch the next one. 17 00:00:47,910 --> 00:00:51,720 ‫And after we actually install these tools, 18 00:00:51,720 --> 00:00:56,220 ‫install these softwares, then we can continue as it is 19 00:00:56,220 --> 00:00:58,170 ‫because there won't be any differences 20 00:00:58,170 --> 00:01:00,630 ‫between Windows and Mac. 21 00:01:00,630 --> 00:01:03,030 ‫So what I'm going to do, I'm going to open Chrome 22 00:01:03,030 --> 00:01:06,150 ‫or any other browser that you may have 23 00:01:06,150 --> 00:01:09,930 ‫and we're gonna go for google.com. 24 00:01:09,930 --> 00:01:10,763 ‫Okay? 25 00:01:10,763 --> 00:01:13,140 ‫Because we're going to find out 26 00:01:13,140 --> 00:01:17,490 ‫where we can actually download this JDK. 27 00:01:17,490 --> 00:01:18,720 ‫So in order to do that, 28 00:01:18,720 --> 00:01:23,100 ‫I'm going to search for JDK download. 29 00:01:23,100 --> 00:01:27,360 ‫And again, JDK stands for Java Development Kit 30 00:01:27,360 --> 00:01:31,170 ‫and it's a kit, it's actually a collection of software 31 00:01:31,170 --> 00:01:35,490 ‫that is needed in order to run Java in our computers. 32 00:01:35,490 --> 00:01:39,750 ‫So this is spelled like this, "JDK download." 33 00:01:39,750 --> 00:01:40,590 ‫Okay? 34 00:01:40,590 --> 00:01:42,930 ‫So I'm gonna search it in Google 35 00:01:42,930 --> 00:01:45,000 ‫and it'll bring me these results. 36 00:01:45,000 --> 00:01:49,740 ‫And first results that we're going to see is the oracle.com. 37 00:01:49,740 --> 00:01:53,460 ‫So the Oracle company actually produces Java 38 00:01:53,460 --> 00:01:55,230 ‫and if you click on that, 39 00:01:55,230 --> 00:01:59,760 ‫it'll take you to the download page of this JDK. 40 00:01:59,760 --> 00:02:01,410 ‫So let me zoom in a little bit 41 00:02:01,410 --> 00:02:03,810 ‫so that you can see it in a better way. 42 00:02:03,810 --> 00:02:04,800 ‫Okay? 43 00:02:04,800 --> 00:02:07,620 ‫So let me close this down, and here you go. 44 00:02:07,620 --> 00:02:11,010 ‫Now you see the final version, 45 00:02:11,010 --> 00:02:15,210 ‫the latest version on the top of this page. 46 00:02:15,210 --> 00:02:18,330 ‫So over here, I have Java 14. 47 00:02:18,330 --> 00:02:20,700 ‫So this is the latest version 48 00:02:20,700 --> 00:02:24,660 ‫at the time that I'm recording this session. 49 00:02:24,660 --> 00:02:28,470 ‫And if you see something like 14.4, 50 00:02:28,470 --> 00:02:30,060 ‫14.2, 51 00:02:30,060 --> 00:02:31,920 ‫it really doesn't matter. 52 00:02:31,920 --> 00:02:35,520 ‫You can go for the latest version, okay? 53 00:02:35,520 --> 00:02:37,830 ‫Just find the latest version over here 54 00:02:37,830 --> 00:02:40,980 ‫and download it on your computer. 55 00:02:40,980 --> 00:02:44,610 ‫If anything changes regarding code base, 56 00:02:44,610 --> 00:02:47,520 ‫of course I'm going to just change 57 00:02:47,520 --> 00:02:49,890 ‫or update the lectures as well. 58 00:02:49,890 --> 00:02:54,890 ‫But it won't matter if you just download JDK 14 or 15. 59 00:02:55,650 --> 00:02:59,610 ‫But there is some minor thing that you should be aware of. 60 00:02:59,610 --> 00:03:04,020 ‫If you go to your computer and say properties like this, 61 00:03:04,020 --> 00:03:07,290 ‫you can see if you have a 64-bit computer 62 00:03:07,290 --> 00:03:09,360 ‫or 32-bit computer. 63 00:03:09,360 --> 00:03:10,320 ‫Okay? 64 00:03:10,320 --> 00:03:13,740 ‫So most of you will have 64-bit computers 65 00:03:13,740 --> 00:03:17,400 ‫and it will be fine to download the latest version. 66 00:03:17,400 --> 00:03:20,880 ‫But if you have 32-bit for some reason, 67 00:03:20,880 --> 00:03:24,360 ‫then you won't be able to download the latest version. 68 00:03:24,360 --> 00:03:27,240 ‫But rather, you're gonna have to scroll down 69 00:03:27,240 --> 00:03:31,080 ‫and find the Java eight version, okay? 70 00:03:31,080 --> 00:03:36,080 ‫So after Java eight, they stopped support for 32-bits. 71 00:03:36,540 --> 00:03:39,157 ‫So you're gonna have to come over here and say, 72 00:03:39,157 --> 00:03:44,157 ‫"JDK download" and download the JDK eight. 73 00:03:44,190 --> 00:03:48,330 ‫But again, it won't make difference in the coding section. 74 00:03:48,330 --> 00:03:49,163 ‫Okay? 75 00:03:49,163 --> 00:03:51,690 ‫So if you're on 32-bit computer, 76 00:03:51,690 --> 00:03:54,330 ‫then then just go for JDK eight 77 00:03:54,330 --> 00:03:58,380 ‫and if you're on 64-bit, just go for the latest version. 78 00:03:58,380 --> 00:04:03,380 ‫So in Java JDK 14, over here, we see a license update. 79 00:04:03,780 --> 00:04:06,090 ‫I'm gonna talk this about a little bit 80 00:04:06,090 --> 00:04:08,250 ‫so that you can understand the license 81 00:04:08,250 --> 00:04:10,500 ‫that you are accepting, okay? 82 00:04:10,500 --> 00:04:12,840 ‫But first of all let me show you 83 00:04:12,840 --> 00:04:15,030 ‫the download section over here. 84 00:04:15,030 --> 00:04:19,320 ‫You will see the Windows x64 installer over here 85 00:04:19,320 --> 00:04:21,960 ‫and you can just find the EXE file 86 00:04:21,960 --> 00:04:23,527 ‫and click on it and say, 87 00:04:23,527 --> 00:04:28,500 ‫"Yeah, I reviewed the license" and download the EXE file. 88 00:04:28,500 --> 00:04:29,670 ‫So of course I'm, 89 00:04:29,670 --> 00:04:33,300 ‫I have downloaded this before in order not to make you wait, 90 00:04:33,300 --> 00:04:36,390 ‫so I'm gonna cancel this, okay? 91 00:04:36,390 --> 00:04:39,063 ‫You can of course wait until it's over. 92 00:04:40,770 --> 00:04:42,090 ‫While you are doing that, 93 00:04:42,090 --> 00:04:44,250 ‫I'm gonna talk about this a little bit. 94 00:04:44,250 --> 00:04:48,000 ‫So Java released a statement saying that 95 00:04:48,000 --> 00:04:52,200 ‫if you are a company and if you're making money 96 00:04:52,200 --> 00:04:56,310 ‫out of Java products, then you should pay me as well. 97 00:04:56,310 --> 00:05:01,310 ‫It asks something like a 30 bucks annually I believe. 98 00:05:01,710 --> 00:05:04,920 ‫But actually I don't use this license 99 00:05:04,920 --> 00:05:07,650 ‫because I'm not a corporation 100 00:05:07,650 --> 00:05:11,400 ‫and I only use this for my personal things, 101 00:05:11,400 --> 00:05:14,610 ‫personal accounts like learning how to code Android 102 00:05:14,610 --> 00:05:18,570 ‫or publishing my app on Google Play, okay? 103 00:05:18,570 --> 00:05:22,680 ‫So I won't be charged for this amount. 104 00:05:22,680 --> 00:05:25,380 ‫And in fact the Android Studio, 105 00:05:25,380 --> 00:05:28,200 ‫the thing that we're going to download later on 106 00:05:28,200 --> 00:05:31,740 ‫actually comes with its own JDK as well. 107 00:05:31,740 --> 00:05:35,550 ‫So you won't be actually bothered with this license. 108 00:05:35,550 --> 00:05:40,140 ‫However, just be remind that if you build a corporation 109 00:05:40,140 --> 00:05:43,950 ‫out of this and if you really wanna get this license, 110 00:05:43,950 --> 00:05:47,520 ‫then you're more than welcome to do so ,okay? 111 00:05:47,520 --> 00:05:49,950 ‫So find the EXE file. 112 00:05:49,950 --> 00:05:52,800 ‫So I'm gonna just take this into my desktop 113 00:05:52,800 --> 00:05:55,290 ‫so that you can see it in a better way. 114 00:05:55,290 --> 00:05:59,610 ‫And I'm going to double click on it in order to run this. 115 00:05:59,610 --> 00:06:01,530 ‫So as you can see, it asks 116 00:06:01,530 --> 00:06:05,190 ‫if I really wanna run this or don't run this. 117 00:06:05,190 --> 00:06:07,050 ‫I wanna run this. 118 00:06:07,050 --> 00:06:08,550 ‫Okay? 119 00:06:08,550 --> 00:06:12,300 ‫And if it asks for any permission, you can give it. 120 00:06:12,300 --> 00:06:14,370 ‫And if you come across any problems, 121 00:06:14,370 --> 00:06:16,237 ‫you can just right click on it and say, 122 00:06:16,237 --> 00:06:19,350 ‫"Run as administrator" in order to bypass 123 00:06:19,350 --> 00:06:22,590 ‫an antivirus blocks or something like that. 124 00:06:22,590 --> 00:06:24,210 ‫So I'm gonna say "next", 125 00:06:24,210 --> 00:06:28,470 ‫and before I continue, you can take this note. 126 00:06:28,470 --> 00:06:31,200 ‫I'll take this as a note like, where are you saving this? 127 00:06:31,200 --> 00:06:34,470 ‫Because we are going to need that information later on. 128 00:06:34,470 --> 00:06:38,850 ‫I'm saving this under program files, Java folder, okay? 129 00:06:38,850 --> 00:06:43,470 ‫I'm going to show you where and why we are going to use it. 130 00:06:43,470 --> 00:06:46,380 ‫And actually that's it, it's going to install it 131 00:06:46,380 --> 00:06:48,690 ‫and we're done with the installation, 132 00:06:48,690 --> 00:06:52,830 ‫but after that, we're going to have to do something. 133 00:06:52,830 --> 00:06:54,930 ‫By the way, you can't delete this if you want. 134 00:06:54,930 --> 00:06:56,130 ‫I'm not gonna delete it 135 00:06:56,130 --> 00:07:01,050 ‫because I'm going to use it for other recordings later on. 136 00:07:01,050 --> 00:07:04,230 ‫So go for the folders 137 00:07:04,230 --> 00:07:06,390 ‫like program files and Java. 138 00:07:06,390 --> 00:07:09,150 ‫So that's where I have saved this. 139 00:07:09,150 --> 00:07:13,260 ‫And as you can see, we see the JDK 14 folder over here. 140 00:07:13,260 --> 00:07:15,060 ‫I'm going to double click on that 141 00:07:15,060 --> 00:07:17,430 ‫and we will see the bin folder. 142 00:07:17,430 --> 00:07:19,260 ‫And that's what I'm looking for. 143 00:07:19,260 --> 00:07:21,300 ‫If you go into the bin folder, 144 00:07:21,300 --> 00:07:24,270 ‫you will see a lot of tools like that. 145 00:07:24,270 --> 00:07:26,580 ‫And if you scroll down a little bit, 146 00:07:26,580 --> 00:07:30,180 ‫you will see the Java.exe file. 147 00:07:30,180 --> 00:07:33,900 ‫So this is the actual Java file that runs 148 00:07:33,900 --> 00:07:35,850 ‫when you run something with Java 149 00:07:35,850 --> 00:07:39,090 ‫or when you try to run Java in your computer. 150 00:07:39,090 --> 00:07:43,470 ‫And if you see only Java rather than Java.exe, 151 00:07:43,470 --> 00:07:45,030 ‫it's fine as well. 152 00:07:45,030 --> 00:07:48,150 ‫Just go to properties, okay? 153 00:07:48,150 --> 00:07:53,150 ‫And just copy this path, the location that this Java file 154 00:07:54,270 --> 00:07:56,160 ‫has been saved on your computer 155 00:07:56,160 --> 00:07:59,790 ‫because we are going to need that location 156 00:07:59,790 --> 00:08:04,790 ‫and beware that it ends with slash bin folder at the end. 157 00:08:05,460 --> 00:08:08,760 ‫So we're going to take this, we're going to copy this 158 00:08:08,760 --> 00:08:12,360 ‫because we want our computer to know 159 00:08:12,360 --> 00:08:16,650 ‫that Java is actually located in this location. 160 00:08:16,650 --> 00:08:20,760 ‫We're gonna say this to our computer. 161 00:08:20,760 --> 00:08:23,970 ‫So find your "My Computer" icon on your desktop 162 00:08:23,970 --> 00:08:28,290 ‫or from here as well, just go to properties one more time. 163 00:08:28,290 --> 00:08:32,040 ‫And over here, you will see the advanced system settings. 164 00:08:32,040 --> 00:08:35,430 ‫So just click on that and you will see something 165 00:08:35,430 --> 00:08:38,460 ‫called environment variables over here. 166 00:08:38,460 --> 00:08:40,950 ‫So we're gonna need that. 167 00:08:40,950 --> 00:08:44,310 ‫So open it and I'm going to show you what it does. 168 00:08:44,310 --> 00:08:47,370 ‫So under environment variables, 169 00:08:47,370 --> 00:08:50,190 ‫there is something called path. 170 00:08:50,190 --> 00:08:54,270 ‫So find the path on the bottom pane over here. 171 00:08:54,270 --> 00:08:59,270 ‫So path means, a file is located at this path, at this URI. 172 00:09:00,810 --> 00:09:04,710 ‫So we're going to actually paste 173 00:09:04,710 --> 00:09:09,710 ‫the thing that we have copied from the Java.exe properties 174 00:09:10,200 --> 00:09:11,610 ‫in this path. 175 00:09:11,610 --> 00:09:13,050 ‫So if you're on Windows 10, 176 00:09:13,050 --> 00:09:15,090 ‫you're going to exactly see this. 177 00:09:15,090 --> 00:09:18,240 ‫And if you're on the lower versions, like Windows seven, 178 00:09:18,240 --> 00:09:21,690 ‫Windows eight, you will see a little box. 179 00:09:21,690 --> 00:09:23,610 ‫And at the end of this little box, 180 00:09:23,610 --> 00:09:25,920 ‫you can just put a semicolon 181 00:09:25,920 --> 00:09:28,830 ‫and paste the thing that you have copied. 182 00:09:28,830 --> 00:09:30,330 ‫And if you're on Windows 10, 183 00:09:30,330 --> 00:09:33,990 ‫you can double click over here or you can say, "New", 184 00:09:33,990 --> 00:09:37,950 ‫and paste the thing that you have copied like this. 185 00:09:37,950 --> 00:09:42,180 ‫So right now, we have actually specified this folder 186 00:09:42,180 --> 00:09:46,960 ‫as an environment path so that our computer will know 187 00:09:46,960 --> 00:09:51,240 ‫where our Java is actually located. 188 00:09:51,240 --> 00:09:54,570 ‫So you're going to see what I mean in a minute. 189 00:09:54,570 --> 00:09:57,390 ‫I'm going to close everything down 190 00:09:57,390 --> 00:10:01,860 ‫and I'm going to come over here to my Windows icon 191 00:10:01,860 --> 00:10:04,530 ‫and search for CMD. 192 00:10:04,530 --> 00:10:08,760 ‫So this will bring up the command prompt, okay? 193 00:10:08,760 --> 00:10:10,890 ‫Just click on the command prompt. 194 00:10:10,890 --> 00:10:13,830 ‫And this is the command prompt, like a terminal. 195 00:10:13,830 --> 00:10:16,980 ‫You just write a code, write a command, 196 00:10:16,980 --> 00:10:21,810 ‫and it will get executed by your Windows computer. 197 00:10:21,810 --> 00:10:24,990 ‫And we're not actually going to use this a lot 198 00:10:24,990 --> 00:10:28,530 ‫during our Android section, 199 00:10:28,530 --> 00:10:32,070 ‫however, we are going to test and see 200 00:10:32,070 --> 00:10:35,490 ‫if our computer recognizes Java. 201 00:10:35,490 --> 00:10:40,490 ‫So as you can see, I have typed "Java" and hit enter. 202 00:10:40,830 --> 00:10:43,890 ‫So it executed the Java comment 203 00:10:43,890 --> 00:10:47,550 ‫and gave me back some kind of output. 204 00:10:47,550 --> 00:10:51,420 ‫So all I did was writing Java and hitting enter. 205 00:10:51,420 --> 00:10:54,570 ‫And as you can see, there are a lot of expressions, 206 00:10:54,570 --> 00:10:56,700 ‫descriptions over here, 207 00:10:56,700 --> 00:11:00,510 ‫saying, "How actually I can use Java command 208 00:11:00,510 --> 00:11:03,780 ‫in the command prompt" and I don't wanna do that. 209 00:11:03,780 --> 00:11:07,800 ‫I don't even want to use Java in command line. 210 00:11:07,800 --> 00:11:10,110 ‫However, I just want to test 211 00:11:10,110 --> 00:11:13,410 ‫if our computer recognizes 212 00:11:13,410 --> 00:11:15,180 ‫Java command, 213 00:11:15,180 --> 00:11:20,130 ‫so that it'll run smoothly on my computer. 214 00:11:20,130 --> 00:11:23,400 ‫So if you experience any problem in here, 215 00:11:23,400 --> 00:11:26,220 ‫just make sure you go back and paste the thing 216 00:11:26,220 --> 00:11:29,070 ‫that you have copied exactly like I do 217 00:11:29,070 --> 00:11:31,233 ‫in the environment variables.