Getting Started
Submitted by GeePee on Wednesday, June 3, 2015 - 23:43.
Introduction:
This tutorial will help you get started with developing your own Java applications from scratch.
Requirements:
For developing Java applications you will need either an IDE (Integrated Development Environment) such as Eclipse which has it's own compiler built in which makes it easier for you to debug your program. Or, you can decide to use a Text Editor such as; Notepad, Notepad++ or Sublime then you will have to compile your .java files each time you would like to test your program. I would highly recommend using an IDE.
You will also need a Java JDK and the latest version of Java is recommended, both of which can be downloaded from http://www.java.com/en/.
Basic Application:
To ensure you have installed everything OK you should create a simple test project from the below steps:
1: Open your IDE and create a New Java Project.
2: Your IDE should now of generated a new Java Project. Now you can create a new Class within the src folder of your Project. Name this class "Main.java"
3: By default your class should have:
Within the two braces is the code block for your class. If you need to import any namespaces these will go above the generated line (more on these later).
For a basic program we will just output a line to the Console. The Console is the part of the program which is built in to the IDE or Command Line (if compiling manually), this is very useful for testing output.
So, to do this we are going to create a simple piece of code. You will learn about how the code works and how you can improve on it in later tutorials...
Finished!
As you can see from the thumbnail of this page, our output has worked! You are now ready to begin your next tutorial.
- public class Main {}
Add new comment
- 75 views