Greetings, loyal code monkees!
OK, so today is a very big day in the history of this class: our first day of JAVA programming! Before we do anything, you all should probably make sure of these three things:
A)
JAVA FOLDER that you have a folder somewhere on your desktop or in your My Documents folder thats named after yourself, plus the word JAVA. Please do NOT create it in the H drive. If you do, and you have problems, they become YOUR problems.
B)
TEXTPAD Make sure that you have a shortcut to the TextPad program, and that it starts when you click on the shortcut. TextPad is the IDE (integrated Development environment) that we will be using, so its important that your copy works.
C)
JAVA sdk Make sure that TextPad is linked to JAVA properly. There are two things you have to do regarding that:
1) Make sure that when you click on the TOOLS menu item in TextPad, that you either see a submenu that says "External Tools" or you have the External Tools listed directly. These tools are as follows and I quote:
Compile Java Ctrl + 1
Run Java Application Ctrl + 2
Run Java Applet Ctrl + 3
2) Make sure that these tools actually work by writing, saving, compiling and running a small sample program. Here is what you do:
in TextPad, type in the following:
// the year’s first Java program
// first name last name
public class HelloWorld
{
public static void main( String args[] )
{
System.out.println( "Hello World!" );
} //end main
} //end class
SAVE the program as a Java file in your Java folder.
Make sure the file is named EXACTLY the same as the name of the public class
Then, compile your program by hitting Ctrl + 1, or by clicking on the menu item.
If this goes correctly, you will get a message "Tool completed successfully"
Also, you will notice that there is now a second file in your folder. It has a .class extension
Then, run this program as an application by hitting Ctrl + 2 (You can always tell its an application and not an applet by the fact that it has a main method.)
If it works, then rejoice and be of good cheer. You've just taken your first step into a larger universe
Mr. L