Install Eclipse and JDK


Install JDK

For Eclipse to work, you have to have a JDK. Go to https://www.oracle.com/java/technologies/javase-downloads.html and on the latest version press the download JDK button (under the "Oracle JDK" header). You will be redirected to a page containing the download. You will see Linux downloads, Mac Downloads, and Windows downloads. Click on the one that suits your system prefrences and is an installer.

For windows, when you have it downloaded, open it and allow it to make changes to your machine. Then, if you are on windows, a window will pop up, the installation window. On it press "Next." You will then see a window, at the bottom of it is where the JDK folder is located, remeber where the folder is. Press "Next" and Java will install. When it is done installing, you will have to add it to your system paths, so take that directory where the JDK folder is and at the end add the word bin, then go to the start menu and type variable, open system enviroment variable, open it, and at the bottom of the window is a button saying Enviorment variables, click on it. A new window will pop up with two containers, in the botom one look for "Path" click on it and press edit. A new window will pop up, on it press new and paste in the directory. Press Ok on all of the windows. After you have pressed Ok on all of the windows, open a command propmt and type javac -version. It should give you javac and then the version you installed.


For Mac OS, when it is downloaded, open it, a window will pop up. Press on the package on the screen, a window will pop up, on it press continue. The window will change, press install. When it finished installing press close. Open a terminal and type "java -version" it should give you "java version (the version you downloaded) (current date)".


Install Eclipse


Windows

To download Eclipse for Windows, go to www.eclipse.org/downloads/ press on "Download 64 bit." When you pressed on it you will be brought to another page. Press on Download. This will start the download, it will download the installer, when it is downloaded, press on it and open it. When the installer is open, press on the first block, Eclipse IDE for Java Developers. It will change the window, showing you where JRE is located and the installation. It will also ask you if you want to create a desktop shortcut and create a menu entry. It will change the window press on accept now. The window will close and the installation will continue. After the installation is complete press launch. Eclipse will open, select a workspace directory for Eclipse. When you have selected the directory of the Eclipse workspace, press luanch.


Mac OS

To download Eclipse on Mac OS, go to www.eclipse.org/downloads/download.php?file=/oomph/epp/2020-03/R/eclipse-inst-mac64.dmg, press download. When it's done downloading open it and press on eclipse-inst-mac64.dmg and open it, a window should pop up with Eclipse Installer in the top left cornor, open it. When you have opened it, press on the first option, Eclipse IDE for Java Developers. It will open a new window, it will have a button that says install. Press it. When a licenes comes up, press accept now. It will continue to install. When it finished installing, press launch.



When the Eclipse editor opens, close the Welcome tab. It will bring you to the editor, in the package explorer press on "Create a Java project." It will bring up a window, open the folder name "Java" and then press on "Java Project." It will bring up a window asking for your project name, enter in a project name, when you have named it press next. It will bring up a new window, press don't create on it. The window will close, and you will see, in the package explorer, with a folder with the name of your project. Press on it to highlight it, next navigate to the top bar and go to the 3rd section. There should be a green circle with a C in it and a plus at the top right cornor. That is the new class button. Name it, and press finish. Next type the infamous lines, inside of the class brackets,

public static void main(String args[]) {
System.out.println("Hello World");
}

Next go to the second section at the top bar and press the green circle with the white triangle in it, next to the bug. Press it and your first Java program will run. A console will open with the words "Hello World". This basic information will be used for all of our tutorials.


Here are the buttons we need to use. Tools