• Log in or sign up for an account here: https://www.sythe.org/login

Basics of Java: Part 1

Jimmy

Ghost

Retired Sectional Moderator
$5 USD Donor
Joined
Jun 24, 2008
Sythe Gold
25
Messages
2,421
Location
Psychocyberspace
Basics of Java: Part 1- Settings Up the JDK and an IDE​




Part I. Getting the JDK and NetBeans

The JDK, or Java Development Kit, is essential for all beginners, as it allows you to compile your source files (.java) into runnable class files (.class). This guide won't go too in-depth on this step, as there are many guides on getting the JDK setup, however, this guide will give you a general outline of where to get it, and such. Firstly, head on over to http://java.sun.com/javase/downloads/index.jsp and locate where it says "JDK X Update XX with NetBeans" at the top (where the X and XX are version numbers, ex. "JDK 6 Update 17 with NetBeans"), and further proceed to click on the "Download" button to the right of it.
29gohef.png


Select your platform from the drop down menu, and hit "Download." If you are asked for a NetBeans account, simply click the "Skip this step" option.
2m516co.png


A few second later, your download should begin. Save this file to your desktop and wait patiently for it to download (it may take up to half an hour on a slow connection, as it is a very large file).
21noara.png


When it is done downloading, double click it to start the program. If a UAC (User Account Control) window pops up (Windows only), then click "Allow". After about 30 seconds of configuring, the installer should popup.
ohpwkj.png


Hit the next button to continue and you should now see the license of the software. Check the "I accept" box and hit the next button, again. It will now give you the folder to install the JDK to. Keep the default one and hit next. It will now ask for a folder to install NetBeans into. Again, keep the default setting, and hit next. You will now see a summary page.
155436u.png


Click the install button to begin the installation. Now, you must wait until it is done installing (it could take a fair amount to time, so you should probably go and read a book, or watch tv). After it's finally done installing, click the Finish button, and you should be done!
2qwmng1.png


Part II. Starting Up NetBeans

NetBeans is an IDE (Integrated Development Environment) for various programming languages, such as Ruby, Java, C, C++, and PHP, although in these Tutorials, we will be using NetBeans for Java alone. Firstly, to start up NetBeans, you should double-click the icon that was created on your desktop.If the installer didn't create a NetBeans icon on your desktop, then click on the start menu (windows icon in the lower-left corner of the screen), click "All Programs," select the NetBeans folder, and click "NetBeans IDE X.X.X" (where X's are version numbers).
33y2uzs.png


You should then see a splash-screen popup. Wait for NetBeans to load completely and the splash-screen to disappear.
2ym6cli.png


If you get a popup asking you to register your NetBeans, click "Never Register." Your NetBeans is now ready to create a project on!
6tl26d.png


Part III. Creating A Project

With NetBeans now open, click File -> Net Project. A dialog box should now popup. Under Categories, select "Java," and under Projects, select "Java Application."
2u7vvk8.png


Hit the next button. The dialog box should now ask for your project name, project location, and main class name. Under project name, put whatever you want to name your project ("My First Java Application" in my example). Leave the project location as the default (or change it, if you have some important reason to do so), and set the main class name to whatever your main class is ("MyFirst JavaApp" in my example).
2vlnqqq.png


Hit the finish button and NetBeans should create your project for you.
 
Runescape Gamblingrunescape gambling
Back
Top