Viewers: in countries Watching now:
Join author David Gassner as he explores Java SE (Standard Edition), the language used to build mobile apps for Android devices, enterprise server applications, and more. This course demonstrates how to install both Java and the Eclipse IDE and dives into the particulars of programming. The course also explains the fundamentals of Java, from creating simple variables, assigning values, and declaring methods to working with strings, arrays, and subclasses; reading and writing to text files; and implementing object oriented programming concepts.
If you're working on Microsoft Windows, the first step is to download and install the Java Development Kit from Oracle. You can get the Java Development Kit from this URL java.oracle.com. This link will take you take you to the current homepage for the Java technology. On this screen, look under Software Downloads and locate the link for Java SE. This is the Java SE Downloads screen, take a look at the list of available downloads. The most recent version of Java will be listed at the top.
As of the time of this recording, the most recent version of Java was Java SE 7u1. Notice that there are two different download links one for JDK, the Java Development Kit and one for JRE, the Java Runtime Environment. You want the JDK. It actually includes both downloads in one package, you'll be able both to develop Java applications and run them. Now, even though Java 7 was finalized for Windows as of the date of this recording, there was not a similar final version of Java 7 for Mac OS X. So for this course, I'm primarily using Java 6 to make sure that both operating systems can run all the code I'll be showing.
To get Java 6, scroll down a little bit further and you'll see a link for the most recent version of Java 6, which as of this point is Update 29. Click the Download link under JDK. Here's a listing of all the installers for the Java Development Kit version 6. You'll need to accept the License Agreement before you can download anything. But then for Windows, take a look at the options. There are three versions. Most developers will want either the 32- bit which is Windows x86 or the 64-bit versions, which is Windows x64.
If you're not sure whether you're running 32 or 64-bit Windows you can find out from the Control Panel. Go to the Start menu, choose Control Panel and if you're working on Windows Vista or Windows 7, follow these steps. Go to System and Security and then to System. If you're working on Windows XP, you can just click System in the Control Panel. Take a look at the System type. If it says 64-bit Operating System, that's the version of Java you want and if it says 32-bit that's the version you want.
Now that you know which version of Windows you're running, go back to the Oracle webpage and download the right version of Java for your version of Windows. I've downloaded the 64- bit version to my desktop. Now, I'm going to run the installer. If you're working on Windows XP, you can just double click it and if you're working on Windows Vista or Windows 7, right click and choose Run as administrator. When you're prompted, click Yes to allow the program to run. The rest of the process is pretty straightforward.
On this option screen, you're asked which element of the Java Development Kit you want. I recommend accepting everything and clicking Next. The first part of the installation is copying over the files you need for development that is the commands such as java, javac, jar, javadoc and others. Once this primary installation is done, a secondary installation will pop-up and that will be for the Java Runtime Environment or JRE. When you're prompted for the installation of the JRE, once again click through the process and allow the installation to complete.
When you see this screen, the installation is complete. Click Finish and if you're prompted in a web browser to register, you can either choose to register or not. I'm just going to close the browser. Now, let me show you where Java is installed. I'll go to Windows Explorer, from there I'll go the C:\program files folder and under there you'll see a folder named Java and within that folder two subfolders for the Development Kit and the JRE. The jdk folder has a folder named bin or b-i-n and this folder contains all of the development applications.
Java, which is used to run applications from the command line, javawm, which is specifically designed to run applications on Windows, javac the compiler and many others. Now you're going to want to add this folder to your system path to make it easy to run applications from the command line. So on Windows Vista or 7, I'm going to click on the folder icon here and that turns the folder structure into a string I can copy to the clipboard. Now I'll add that string to my system path.
I'll go back to the Control Panel again. Now, you can set your environment variable from a screen that's fairly well buried in the Control Panel, but an easy way to get there is to click into the search box, this works only on Vista and Windows 7 not on Windows XP, and type in environment or some part of that string. This will take you to links for system environment variables. I recommend setting the system environment variables for the entire computer not just your account. I'll click the link and that takes me to this screen.
If you're working on Windows XP, you can just go to the Control Panel's System Panel and you'll find a very similar option. Click Environment Variables, scroll down in the list of System variables and locate the path. Click and then edit. Place the cursor at the end of the string. Make sure that there is a semicolon at the end so that it terminates whatever is the last value in this variable. Paste in the location of the bin folder at the end and then for housekeeping add a semicolon.
Click OK, click OK and click OK again. Now to test your path and to make sure you're running the right version of Java, go to a command window. I'll go to the Start menu and type cmd. If you're working on Windows XP, choose the appropriate option to open a command window. That opens up a command window on my system. I'll first test Java the applications that you run. I'll type java-version and that tells me that my runtime Java is 184.108.40.206 that is Java 6 Update 29.
Now, I'll check my compiler, javac - version, and once again I see that I'm running the right version of Java. If you can execute the runtime command java and the compiler command javac, you're ready. You've installed Java on your system and you're ready for the next step installing a development environment.
There are currently no FAQs about Java Essential Training.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.