< Return to Video

Java Programming Tutorial - 1 - Installing the JDK

  • 0:01 - 0:06
    What's going on everybody? It's Bucky and
    welcome to your very first Java tutorial.
  • 0:06 - 0:11
    Now in this tutorial, before we begin
    writing any programs, we first need to
  • 0:11 - 0:16
    download something called the JDK. And
    for all you new Java developers out there,
  • 0:16 - 0:20
    this is the program that let's you
    actually write Java
  • 0:20 - 0:22
    and actually compile it.
  • 0:22 - 0:26
    And compile just means - uh -
    transferring it from code you can
  • 0:26 - 0:29
    understand to code the
    computer can understand.
  • 0:29 - 0:33
    So - uh - just follow me and by the end
    you'll be able to write Java code.
  • 0:33 - 0:36
    So the first thing I need you to do is to
    go ahead and
  • 0:36 - 0:39
    open up your Internet browser right here.
  • 0:39 - 0:43
    And once you have that open,
    I'm going to use Firefax - uh Firefox -
  • 0:43 - 0:48
    go ahead and go to the website
    java.sun.com.
  • 0:48 - 0:52
    And this is going to give you
    Java's main page.
  • 0:53 - 0:56
    What you want to look for is the
    download link and this is
  • 0:56 - 0:59
    going to give you a bunch of different
    Java additions to download.
  • 0:59 - 1:03
    You're going to want to go to the
    Java SE link.
  • 1:03 - 1:07
    This stands for Java Standard Edition.
    So go ahead and click that.
  • 1:07 - 1:11
    And what we're looking for is something
    called the JDK.
  • 1:11 - 1:17
    This stands for the Java Development Kit
    so we can write and - uh, well -
  • 1:17 - 1:19
    compile Java programs.
  • 1:19 - 1:22
    Now we just want the top one
    which is the standard one.
  • 1:22 - 1:25
    This EE stands for Enterprise Edition
    and this NetBeans is something else,
  • 1:26 - 1:27
    we don't want that.
  • 1:27 - 1:32
    Just go ahead and find the
    standard basic edition and click download.
  • 1:32 - 1:36
    And once you click that it's probably
    going to bring you to a new page
  • 1:36 - 1:39
    - uh - let's see.
  • 1:39 - 1:44
    Yep, it's going to say 'Windows'
    which we want and 'English' which we want.
  • 1:44 - 1:47
    Go ahead and agree and press continue.
  • 1:47 - 1:51
    Um - I already have this downloaded
    so I'm not going to download it again,
  • 1:51 - 1:53
    that would just be stupid.
  • 1:53 - 1:57
    But once you download it,
    it's going to give you an executable file.
  • 1:57 - 2:01
    Now, your executable file is going to
    look something like one of these.
  • 2:01 - 2:05
    This is something else I downloaded but
    it's going to give you a file like this,
  • 2:05 - 2:06
    called .exe.
  • 2:06 - 2:10
    Once you get that file,
    go ahead and double click this.
  • 2:10 - 2:14
    And that's going to start the wizard to
    download the JDK.
  • 2:15 - 2:20
    Now it also might give you a
    file on your desktop right here.
  • 2:20 - 2:23
    Like, put it somewhere right here.
    If it's right there,
  • 2:23 - 2:26
    then just double-click that.
    And once you do,
  • 2:26 - 2:29
    a wizard is going to pop up and
    you're probably going to have to click
  • 2:29 - 2:32
    'Next' forty times and
    press 'I agree', 'I agree' to some stuff,
  • 2:32 - 2:33
    'Next', 'Next'.
  • 2:33 - 2:37
    But once that's all done, then you're
    going to have the Java compiler
  • 2:38 - 2:42
    downloaded. Now let me show you guys
    what the Java compiler is.
  • 2:42 - 2:47
    If you go to your start menu,
    then press 'cmd' and press enter,
  • 2:47 - 2:50
    your command prompt is going to come up.
  • 2:50 - 2:53
    Now, what this allows you to do,
    is have access to your Java compiler.
  • 2:53 - 2:59
    And again, like I said before, the
    Java compiler allows you to transfer code
  • 2:59 - 3:03
    that you can understand to
    code the computer can understand.
  • 3:03 - 3:05
    And that's what we just downloaded.
  • 3:05 - 3:06
    So, let's test it out.
  • 3:06 - 3:07
    javac
  • 3:07 - 3:11
    Press enter, nothing's working.
    And nothing's working
  • 3:11 - 3:13
    because the Java compiler,
  • 3:13 - 3:17
    um - it has it downloaded but whenever you
    try and use it,
  • 3:17 - 3:19
    it doesn't know where it is.
  • 3:19 - 3:21
    So let me show you guys how to do that.
  • 3:21 - 3:24
    And again,
    pay very close attention to this.
  • 3:24 - 3:28
    Hopefully you downloaded it with
    all the default settings.
  • 3:28 - 3:32
    Um, if you didn't, well you'll still be
    able to see what's going on.
  • 3:32 - 3:36
    But, go ahead and in your start menu,
    click on 'Computer'.
  • 3:36 - 3:40
    Now go ahead and click the local disk,
    or whatever your main hard drive is,
  • 3:40 - 3:43
    then go ahead and click 'Program Files'.
  • 3:44 - 3:48
    Now you should have a folder
    called 'Java', go ahead and click that.
  • 3:48 - 3:52
    Now go ahead and click the version JDK.
    If you don't see this it means
  • 3:52 - 3:53
    you didn't download it right.
  • 3:54 - 3:57
    So go ahead and click that, JDK.
  • 3:57 - 4:00
    The next thing and last thing I want you
    guys to do is click on the thing
  • 4:00 - 4:02
    that says 'bin', right here.
  • 4:02 - 4:06
    And remember you follow all these
    instructions very carefully.
  • 4:06 - 4:09
    Next, right-click on any of these things
    right here.
  • 4:09 - 4:12
    Just click on your top-most one.
    Remember, right-click it.
  • 4:12 - 4:15
    And click 'Properties'.
  • 4:15 - 4:20
    Now this is where you're going
    to tell Java to look for your compiler.
  • 4:20 - 4:24
    So it says 'Location'.
    Go ahead and copy all of 'Location'.
  • 4:25 - 4:26
    Right-click it and copy it.
  • 4:26 - 4:31
    It should say something like
    C:\Program Files\Java\[your version]\[bin]
  • 4:31 - 4:33
    The last thing,
    make sure you get that 'bin'.
  • 4:33 - 4:37
    It's very important, if you don't see it,
    do this tutorial again
  • 4:37 - 4:39
    and do exactly as I say.
  • 4:39 - 4:41
    Anyways, you want to see that 'bin'.
  • 4:41 - 4:45
    So once you have this golden code,
    that's what we're looking for,
  • 4:45 - 4:47
    go ahead and 'X' out of that.
  • 4:47 - 4:53
    Now that's where the compiler is. So how
    do we tell your computer to look there?
  • 4:53 - 5:00
    Well go ahead and [right] click
    'My Computer' again, from the start menu.
  • 5:00 - 5:03
    And click 'Properties'. Remember, you
    want to right-click it and click
  • 5:03 - 5:04
    'Properties'.
  • 5:04 - 5:05
    All these are very important.
  • 5:05 - 5:08
    Go ahead and click
    'Advanced System Settings'.
  • 5:08 - 5:14
    And probably a little message is going
    to pop up. If my computer is not freezing.
  • 5:16 - 5:18
    And it is so...
  • 5:18 - 5:24
    'My Computer'. 'Properties'.
    'Advanced System Settings'.
  • 5:24 - 5:27
    There we go. Continue.
  • 5:27 - 5:30
    And you're going to see something in your
    'System Properties'
  • 5:30 - 5:32
    called 'Environment Variables'.
  • 5:32 - 5:33
    Go head and click that.
  • 5:34 - 5:38
    And pay attention to what
    I'm going to do here.
  • 5:38 - 5:41
    What we want to do is create
    a new user variable.
  • 5:41 - 5:43
    Go ahead and click 'New'.
  • 5:43 - 5:46
    Now the variable name for this,
    you have to write 'Path'.
  • 5:46 - 5:48
    P. A. T. H.
  • 5:48 - 5:53
    And the variable value is going
    to write where that compiler is.
  • 5:53 - 5:56
    Remember, that link with the 'bin'.
    That's why it's really important
  • 5:56 - 5:57
    you get that link.
  • 5:57 - 6:00
    Now go ahead and click 'OK'.
  • 6:00 - 6:02
    And, bam. Click 'OK' on this.
  • 6:02 - 6:07
    Okay, you now have your compiler set up
    and ready to run.
  • 6:07 - 6:10
    So go ahead and go back to your
    command line.
  • 6:11 - 6:15
    And in command line,
    go ahead and type 'javac'.
  • 6:15 - 6:19
    And, unlike before, we now have a bunch
    of crap that pops up.
  • 6:19 - 6:24
    And this crap means that our compiler
    is ready and set and ready to go.
  • 6:24 - 6:30
    So now, with that being said, we know that
    we're now able to write Java programs.
  • 6:30 - 6:34
    So in the next tutorial,
    I'll show you guys how to do that.
  • 6:34 - 6:37
    But for now, just follow this tutorial.
  • 6:37 - 6:41
    Um, that's how you install Java on your
    computer so you can actually
  • 6:41 - 6:42
    write Java programs.
  • 6:42 - 6:45
    If you didn't follow those instructions
    exactly like I said,
  • 6:45 - 6:49
    um - you're not going to be able to
    write Java programs on your computer.
  • 6:49 - 6:53
    So make sure you follow this tutorial
    very carefully and do exactly as I did.
  • 6:53 - 6:57
    I know it's kind of a pain in the butt
    but it will be worth it in the long run.
  • 6:57 - 7:01
    So thank you guys for watching,
    make sure you get Java installed.
  • 7:01 - 7:04
    If you have any questions,
    or I wasn't clear on anything,
  • 7:04 - 7:05
    just send me a message.
  • 7:05 - 7:08
    Or leave a comment and
    hopefully I'll get back to you.
  • 7:08 - 7:12
    So again, thank you guys for watching.
    Hopefully you have Java installed.
  • 7:12 - 7:14
    And in the next tutorial,
  • 7:14 - 7:16
    I'll show you guys how to write
    a first Java program.
  • 7:16 - 7:19
    So thank you,
    don't forget to subscribe to my channel.
  • 7:19 - 7:21
    I'll see you in the next tutorial.
Title:
Java Programming Tutorial - 1 - Installing the JDK
Video Language:
English
Duration:
07:21

English subtitles

Revisions