IntelliJ + Java JDK Set up Guide

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone this is going to be our intellij plus java jdk setup guide if you are a random internet stranger welcome hope my guide helps you however this is really intended for my ap computer science principles and ap computer science a student so keep that in mind as we're walking through that and without further ado let's hop in i have these accompanying slides with images and links and that sort of thing this will be available in the description below but it's not really necessary so we're gonna click in so some background information starting out we'll download these two things again there are two things to get the intellij as well as the java.jdk we'll actually walk through an install and then we'll create a project so i have uninstalled intellij in order to be on the same page as you if you already have intellij installed i am 90 sure there's an upgrade option for you to get the latest version however you can of course just like me uninstall it and then go get the new version what is intellij intellij is an ide that stands for integrated development environment you don't need to know that the way i like to think about it is if you want to write an essay you could handwrite it you could use notepad right we could use notepad in order to write our essays that would be insane there is no spell check here okay nobody would do that instead we use a more advanced word processor something like microsoft word or google docs whatever is available to you the same is with java code we could use notepad to write java code don't do that instead get something a lot more advanced something like intellij an integrated development environment intellij itself is open source great word it means it's free platform meaning it can work on windows machines it could work on macs it could work on linux industrial level meaning that it's going to have lots of features i highly highly recommend this software if you are going to write java code in order to install intellij we need to download it it's owned by a company called jetbrains you can go through their website this is a link to get to it but what i really recommend is let's just search for it let me close out some of these tabs so i'm just going to search i want to do download intellij very first link here is the jet brains website i'm going to click on that okay we get to this page there's going to be some links right here that we're going to get to in just a moment but notice that i have the windows already selected by default if you're a mac user you want to switch to mac if you're a linux user you probably shouldn't be watching this video but you can switch to linux so back on the windows i am using a windows machine for this you see there's two versions there's the ultimate which is a enterprise industrial level there's extra features that aren't really necessary for what we're doing so what i'm going to get instead is the community version i'm going to hit this download button right here and that's going to download intellij i'm going to tell it to save and your browser is likely putting that into a downloads folder while that downloads i'm going to go ahead and get a hold of the other piece of software that we need and that is the java jdk just like with intellij i'm going to search download java.jdk there will be links in the slides but again just google it i mean what if my link doesn't work anymore what if it goes to like an old website just google it so oracle is the company that currently owns java i'm going to click on that very first link effectively we're going to get java 14 as of this recording we're on java 14. as long as you have seven or higher you're good for ap computer science a i recommend at least eight or higher and as always it's not going to hurt to get just the newest version okay so over here oracle jdk we'll hit the jdk download button so that's going to download again it's going to go to a downloads folder now i have these downloaded from before all right there's the second copy of the intellij and the jdk is like still downloading anyway i highly highly highly recommend these are the two programs that we need i highly recommend installing the jdk first we'll see why in just a moment i'm going to delete this intellij download while we're at it so these are the two programs um now i have the jdk already installed it's going to ask me do i want to reinstall it for this video yeah so i'm going to hit yes you likely don't have that prompt because this may be your first time installing the jdk it's going to take us through the installation wizard here we're going to go next okay here it's showing us the folder that's going to install into you could change that i don't recommend it in fact what i'm actually going to do while i'm here is do a print screen by hitting alt print screen you can write this down whatever this may be relevant to you in just a moment and i'm going to paste this into paint you shouldn't have to do that we'll see what i'm talking about just a moment but you shouldn't have to if you're just overly cautious go ahead and document where this is going okay we'll go next not only is this going to copy the jdk software to your machine it's going to tell windows or your operating system mac linux that you do have it installed now you may be thinking i already have java what you likely have is the java runtime environment which is used for executing java programs the java development kit jdk is for developing programs hence the d it is for writing java code we were successful in our installation so we're going to hit close again out of these two programs i would install the jdk first but we are now ready to install intellij so i'm going to double click this installation wizard we're going to go next here is the folder where this stuff is going to be installed c drive program files this is less important to keep track of you could change it if you want to i don't recommend that because when it comes to like error shooting like problem solving being on the same page as most humans on the internet helps this does take a gig of space maybe of note but i'm going to hit the next button it's going to ask for some installation options a lot of these are taster's choice like do you want a desktop shortcut yeah sure we'll do that and you want to create an association well i'm going to be doing java files so sure i'm going to hit those two check boxes most of these are just not super important we'll hit next and then lastly install okay this is going to take a couple of minutes to actually go through the install but soon as that is finished we'll launch intellij and we'll actually create our very first project to make sure that our jdk is installed successfully and then intellij is working properly you i mean it is a gig yay all right so we're finished it was successful i'm gonna hit this checkbox here to go ahead and launch it and we'll hit finish okay first thing it's going to ask me is do i want to import settings now i don't really have any settings to give you actually go in and edit some settings ourselves but in the platform it's actually kind of simple and easy to export your settings and so you can either you know use them on a different machine or give them to somebody else but as it stands right now i don't have anything for you we'll just not import anything okay very important screen here for a lot of people it's going to ask what ui theme do we want do you want the darker one that is cognizant of your vision it won't hurt your eyes or do you not value your eyesight i value my eyesight so we're going to go with the darcula over here on the left hand side i highly recommend going with this one for the aforementioned eyesight problems but also this is what i'll be using and so if you are comparing your code to mine you want them to kind of match up as much as possible because that's going to make it easier to find errors so go with the dark theme now i'm just going to skip the remaining like plugin options because they're just not relevant to us you can get down on some nitty gritty i don't recommend that let's just skip the remaining and set default we've got our darcula selected that's the most important thing okay now we're actually at the screen and we're ready to create our very first project i'm going to hit this new project button and it's going to bring up a very important screen i installed the jdk first and that means that up here where it says project sdk intellij has already detected it right what it really did is it asked windows is the jdk installed and windows said yeah here it is and that was part of what happened with the jdk setup process and the reason we did that first if this is read to you then you need to actually go navigate to the jdk you can hit this drop down and you can do add jdk right it's going to bring up an explorer this is why i did this screenshot earlier right i told you to make note of where java is actually being installed maybe by default it's going into c drive program files java and there we see the jdk folder right the exact same path so if this was read you can hit that drop down you can navigate to this folder and then once you have the folder highlighted you can hit ok notice it gave me a second one because it had already selected it but in theory you should only have to do this once once you have the jdk selected intellij is going to kind of remember that and so for future projects whenever you make them and it asks hey what version of java do you want to use well this one i've already selected it once you have that selected you can hit next i'm going to skip past this screen just not important and then it's going to ask us to name our project effectively a project name it's just a folder i want to call this very first one hello world and notice that as i'm typing it's creating a subfolder that's very nice subfolders are going to help us keep our code very organized highly recommended if you don't like this actual location you can hit the ellipses over here and then navigate to a location that you do like but make sure that you have a subfolder because that's going to help you right my project name my subfolder we're good to go i'm going to hit finish it's going to tell me that this folder it doesn't exist do you want to create it yeah so here we are this is intellij really a lot of the meat oh tips i'm going to tell it to not show tips anymore i'm okay you can leave those on if you want but i'm going to first thing expand my project explorer my package explorer this paint over here by actually double clicking on the hello world text and it brings this stuff up i'm next going to expand my project folder and probably the most important folder is this src folder this is short for source code okay this is where your java files need to go i'm going to right click on the src we're going to do a new java class and i'm going to name it i'm going to name it hello world in this case it matches my project folder but it doesn't have to right this could be test actually why don't we just roll with that so i'm going to type in my name for my class and you see that it actually is going to create that file right this is a test.java and we see this text here that may be a bit of a struggle for you to actually even see that text so there's lots of options available there's settings available and i'm going to navigate to those now under file settings now this is an industrial level id i mean it has so many features it is highly editable so they have this search function where you can basically narrow down what you're looking for in this case i'm interested in the size of the font excuse me too much talking and that narrowed down my search options a little bit here's what i'm looking for under editor font you can change what actual font it is using if you're a serial killer you might be interested in comic sans i'm going to leave it on jetbrains mono and i recommend you do the same but most importantly is the size 13 may be pretty good for you at home i'm going to be demonstrating code to people so i'm going to up this i don't know like 32. once you have what you like you can hit apply and that setting will now stick and we have something that's a little bit more readable another important setting that i'm going to go ahead and change is this brace option okay this is a very divisive topic when it comes to this convention right we're going to end up writing code here inside of the braces about half the community is end of line brace about half the community is next line brace okay a lot of the code you're going to see particularly in ap computer science a is going to be next line brace and so i try to be consistent with that now i want to change my settings so that i don't have to bump this down every time right this is just one body we're going to end up with multiple bodies and i don't want to change that every time that's actually a setting an intelligent again i'm going to go to file settings and this one's a little bit harder to find maybe we can type in brace i'm just going to tell you how to get there manually right so under editor i'll collapse some of those under editor code style right editor code style java once you're in this sub menu there are actually several little tabs here what we're interested in is wrapping and braces so i'm going to click that one again this is under editor code style java wrapping and braces and in the middle of this we see brace placement there are four categories and they all say end of line at the moment that text where it says end of line i'm going to click that and tell it to do next line method declaration i want that to be next line lambda declarations we're never going to use those but next line and then other who knows what's in that category next line i'm going to change those four topics those four categories to next line braces what this is going to allow me to do is anytime i make a class declaration or a method declaration the brace is going to end up on the next line and i'll demonstrate that now right i'm going to right click on my src do a new java class and we'll call this one hello world and immediately that brace is on the next line sweet final steps let me actually program something so that i can test to make sure my jdk that intellij are working as intended i'm going to type out a main method and i know i got some people right now that are screaming at their screen because they know short keys of note uh no no don't worry about it here i've got my next line brace and i'm going to type out something again lots of people going to be upset they know short keys i'm going to type out this print statement now i have something i'm actually ready to execute the very first time that we're running this i'm going to right click in free space and tell it to run helloworld.main it's going to take a moment to compile and run but we're going to get a console down below a new pane where our output is actually going to show up and if everything is working correctly the phrase hello world will show up right here and it did this has been our intellij plus java jdk setup guide thanks for watching
Info
Channel: Eckspurt
Views: 23,025
Rating: undefined out of 5
Keywords: IntelliJ, Java, JDK, AP Computer Science, Install, Setup, Tutorial
Id: gjq2OMdtYIA
Channel Id: undefined
Length: 19min 41sec (1181 seconds)
Published: Thu Aug 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.