Remember my first post? I had you download a program called NetBeans. Now is when I will tell you how it works. This is just an IDE (Integrated Development Environment), it happens to be the best Java IDE I know of. Java, in case you don't already know is a great language for applications that don't have to be the fastest possible program on the earth, but that can easily be deployed onto almost any platform. The only requirement for a platform to run a Java application is that it have a JRE (Java Runtime Environment) installed. To begin with, we are just going to make a console application, but eventually I will dive into GUI (Graphical User Interface, a lot of acronyms in programming...) and even making Midlets. Midlets are applications for mobile devices, your cell phone being a prime example. Sound cool? Good, Java is probably my favorite programming language for the combination of ease of use, portability, and good support. Ok, enough jabber, let's go. Fire up NetBeans, this may take a while depending on your computer.
1) At first you will just see the welcome page. From the file menu select New->New Project, helloworld. Then click finish. We're going to keep things simple here. If you want, you can choose to place all of your java apps into a specific folder at this time. NetBeans will remember this and future projects will be created in the folder you chose.
2) The project has been created, now you should be looking at some code. Let's take a look at what the IDE made for you.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package helloworld;
This line above is just telling java to look for functions inside of the helloworld package before it looks elsewhere.
/**
*
* @author Jeff
*/
Java is an object oriented language, so this line just creates the main object, known as a class in Java, for you project.
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment