Archive for October, 2007

36 Part I: Getting Started Figure 2-8: JCreator s (My space web page)

Saturday, October 13th, 2007

36 Part I: Getting Started Figure 2-8: JCreator s work area. In this book I refer to the window in Figure 2-8 (the menu bar, the toolbar, the File View, General Output pane, and so on) as the JCreator work area. But JCreator s help files use slightly different terminology. In JCreator s help files, the window in Figure 2-8 is called the workspace, not the work area. Elsewhere in these help files, JCreator reuses the word workspace to mean something entirely different. To avoid any confusion, I use two different terms. I use work area for the window in Figure 2-8, and I use workspace for that other, entirely different thing. (I explain that entirely different thing in the next paragraph.) JCreator divides Java programs into workspaces. Each workspace is further subdivided into projects. To organize this book s examples, I made a workspace for each chapter, and then made a project for each complete Java program. When you open Chapter02.jcw, you get my Chapter02 workspace a workspace that contains three projects. The projects names are Program0201, Program0202, and Program0203. That s why, in JCreator s File View pane, you see a Chapter02tree with branches labeled Program0201, Program0202, and Program0203. (See Figure 2-8.) Clicking Open in Step 4 may coax out a message box asking if you want to Save the workspace modifications? If so, click Yes. Clicking Open may coax out another box asking if you want to . . . close all document Windows? If so, click Yes.
Are you a Mac user in a search of Mac web hosting provider? We are. once upon a time, we were just like you, trying to find somebody who knows. Unfortunately, we had no luck, so we decided to help many others like you, and us. our team developed Mac friendly web hosting plans, feature packed, constantly monitored, and more than affordable. With us, you are home. Sign up.

Web site design - Chapter 2: Running Canned Java Programs 35 3.

Friday, October 12th, 2007

Chapter 2: Running Canned Java Programs 35 3. In JCreator s menu bar, choose File.Open Workspace from the main menu. Don t choose File.Open. Instead, choose File.Open Workspace. A familiar-looking Open dialog box appears. This dialog box looks in your MyProjectsdirectory. This MyProjectsdirectory is a subdirectory of the directory in which JCreator is installed. The MyProjectsdirectory has subdirectories named Program0201, Listing0302, and so on. The MyProjectsdirectory also has files with names like Chapter02and Chapter03. If you set your computer so that it doesn t hide file extensions for known file types, then the names of the files are Chapter02.jcw, Chapter03.jcw, and so on. (See the sidebar entitled Those pesky filename extensions. ) If you install the custom version of JCreator from this book s CD-ROM, then the MyProjectsdirectory has subdirectories named Program0201, Listing0302, and so on. The regular version of JCreator (downloaded from the www.jcreator.comWeb site) doesn t have these subdirectories. 4. Select the file named Chapter02 (or Chapter02.jcw), and then click Open. In response to your click, JCreator displays its main work area. (See Figure 2-8.) Those pesky filename extensions The filenames displayed in My Computer or in In Windows XP with the control panel s Windows Explorer can be misleading. You may default (category) view: Choose Start. visit the MyProjectsProgram0203direc-Control Panel.Appearance and Themes. tory and see the name MyWebPage. Instead of Folder Options. just MyWebPage, the file s full name is MyWeb In Windows Vista with the control panel s Page.html. You may see two Mortgage default (category) view: Choose Start. Applet files. What you don t see is that one Control Panel.Appearance and Personal file s real name is MortgageApplet.java, ization .Folder Options. and the other file s real name is Mortgage Applet.class. In Windows XP or Windows Vista with the control panel s classic view: Choose The ugly truth is that My Computer and Windows Start.Control Panel.Folder Options. Explorer can hide a file s extensions. This awful feature tends to confuse Java programmers. In the Folder Options dialog box, click the View So, if you don t want to be confused, modify the tab. Then look for the Hide File Extensions For Windows Hide Extensions feature. To do this, Known File Types option. Make sure that this you have to open the Folder Options dialog box. check box is not selected. Here s how:
Maybe you are looking hosting for companies or individuals who want a basic internet presence at budget price with no frills.From our experience you should check Budget Web Hosting part.

34 Part I: Getting Started Running a text-based (Web site translator)

Thursday, October 11th, 2007

34 Part I: Getting Started Running a text-based program The first mortgage-calculating program doesn t open its own window. Instead, the program runs in JCreator s General Output pane. (See Figure 2-7.) A program that operates completely in this General Output pane is called a text-based program. Figure 2-7: A run of the text-based mortgage program. If you re using Linux, Unix, Mac, or some other non-Windows system, the instructions in this section don t apply to you. Visit this book s Web site for an alternative set of instructions. Actually, as you run the mortgage program, you see two things in the General Output pane: Messages and results that the mortgage program sends to you. Messages include things like How much are you borrowing?Results include lines like Your monthly payment is $552.20. Responses that you give to the mortgage program while it runs. If you type 100000.00 in response to the program s question about how much you re borrowing, you see that number echoed in the General Output pane. Running the mortgage program is easy. Here s how you do it: 1. Make sure that you ve followed the previous instructions in this chapter instructions for installing the Java JDK and configuring JCreator. Thank goodness! You don t have to follow those instructions more than once. 2. Launch JCreator. The big JCreator Start Page stares at you from your computer screen. (Refer to Figure 2-6.) If this is your first time running JCreator, you don t see JCreator s Start Page. Instead you see the JCreator Setup Wizard. To get past the Setup Wizard, follow the instructions in the section entitled Running JCreator for the first time in this chapter.
We are the cheapest Catholic web hosting provider, check Catholic Web Hosting services and make sure of alone.

Chapter 2: Running Canned Java Programs 33 Normally, (Web server info)

Wednesday, October 10th, 2007

Chapter 2: Running Canned Java Programs 33 Normally, your JavaDoc directory s name is the name of your Java home directory, followed by docs. For information on your computer s Javadoc directory, see Step 6 of this chapter s Downloading and Installing the Java Development Kit (JDK) section, or Step 7 of this chapter s Installing Java on your computer section. If the wrong directory name appears in the text field, just click the Browse button and navigate to your computer s JavaDoc directory. If you do anything wrong in Steps 3 or 4, you can correct your mistake later. See this book s Web site for details. 6. Click Finish. At this point, the JCreator Start Page appears. (See Figure 2-6.) Running Java Programs In this section, you run three Java programs programs I wrote to help you practice running some Java code. Each program computes the monthly payment on a home mortgage, but each program interacts with the user in its own unique way. After you make your way through this section, you ll know how to run three kinds of programs: a text-based program, a stand-alone GUI program, and a Java applet. Figure 2-6: JCreator s Start Page.
If you need complete web hosting solution you come to right place,try mac web hosting services.

32 Part I: Getting Started JDK Home Directory (Starting a web site)

Tuesday, October 9th, 2007

32 Part I: Getting Started JDK Home Directory listing Figure 2-4: Confirming the location of your Java home directory. For information on your computer s Java home directory, see Step 4 of this chapter s Downloading and Installing the Java Development Kit (JDK) section, or Step 4 of this chapter s Installing Java on your computer section. 4. When you re happy with the name in the home directory text field, click Next. The wizard s last page (the JDK JavaDoc Directory page) appears. 5. Look at the text field on the JDK JavaDoc Directory page. Make sure that this field displays the name of your JavaDoc directory. (See Figure 2-5.) JDK JavaDoc Directory listing Figure 2-5: Confirming the location of your JavaDoc directory.
Our unmatched NT experience allows us to provide the most reliable and affordable hosting for our customers, just check NT Web Hosting services.

Chapter 2: Running Canned Java Programs 31 JCreator (Tomcat web hosting)

Monday, October 8th, 2007

Chapter 2: Running Canned Java Programs 31 JCreator The programs in this book work with almost any Java IDE. But in this chapter, I show you how to use JCreator LE (Lite Edition). I chose JCreator LE over other IDEs for several reasons: JCreator LE is free. Among all the Java IDEs, JCreator represents a nice compromise between power and simplicity. Unlike some other Java IDEs, JCreator works with almost any version of Java, from the ancient version 1.0.2 to the new Java SE 6, and onward to Java SE 7 beta. JCreator LE is free. (It s worth mentioning twice.) If you re the kind of person who prefers plain old text editors and command prompts over IDEs, visit this book s Web site. On that site, I ve posted instructions for writing and running Java programs without an IDE. This book s CD-ROM has a special version of JCreator LE a version that s customized especially for readers of Java For Dummies, 4th Edition! So please install JCreator LE from the CD-ROM. (Who knows? You may like it a lot, and buy JCreator Pro!) For help installing materials from the CD-ROM, see Appendix A. Running JCreator for the first time The first time you run JCreator, the program asks for some configuration information. Just follow these steps: 1. If you haven t already done so, launch JCreator. The JCreator Setup Wizard appears on your screen. The wizard s first page is for File Associations. 2. Accept the File Associations defaults and click Next. The wizard s next page (the JDK Home Directory page) appears. 3. Look at the text field on the JDK Home Directory page. Make sure that this field displays the name of your Java home directory. (See Figure 2-4.) If the wrong directory name appears in the text field, just click the Browse button and navigate to your computer s Java home directory.
Try discount web hosting services, our team’s aim is to offer the best possible web hosting services, at the lowest possible price.

Linux web host - 30 Part I: Getting Started When your docs

Sunday, October 7th, 2007

30 Part I: Getting Started When your docs are all lined up in a row, you can proceed to the next step installing a Java development environment. Preparing to Use an Integrated Development Environment If you followed the instructions up to this point, you have all the software that you need for writing and running your own Java programs. But there s one more thing you may want. It s called an Integrated Development Environment (IDE). If you don t have an IDE, writing and running a program involves opening several different windows a window for typing the program, another window for running the program, and maybe a third window to keep track of all the code that you ve written. An IDE seamlessly combines all this functionality into one well-organized application. Java has its share of integrated development environments. Some of the more popular products include Eclipse, IntelliJ IDEA, and NetBeans. Some fancy environments even have drag-and-drop components so that you can design your graphical interface visually. (See Figure 2-3. For more info on the neat-o Jigloo graphical user interface builder shown here, check out www.cloud garden.com/jigloo/index.html.) Figure 2-3: Using the Eclipse IDE with the Jigloo graphical user interface builder.
Would you like to be a member of headache free web site owner’s community. Now you can. We focus in IX Web Hosting, go go go!

Web hosting control panel - Chapter 2: Running Canned Java Programs 29 If

Saturday, October 6th, 2007

Chapter 2: Running Canned Java Programs 29 If you re a Windows user, Program Filesis probably part of your Java home directory s name. Whenever I tell you to type the directory s name, it s a good idea to type an abbreviated version that doesn t include the blank space. The official Windows abbreviation for Program Filesis progra~1(with a squiggly little tilde character and 1at the end). So if my Java home directory is C:Program FilesJavajdk1.6.0, when I need to type the directory s name, I usually type C:progra~1Java jdk1.6.0. 5. Enjoy the splash screens that you see while the software is being installed. At the end of the installation, you click the proverbial Finish button. But you re still not done with the whole kit n caboodle. The next step is installing the Java documentation. 6. Copy the documentation to your Java home directory. In Step 9 of the previous section, you downloaded a file named jdk-6doc. zip(or something like that). Unzip (extract) this file so that its contents are in your Java home directory. Your Java home directory has a name like jdk1.6.0. That s not the same as another directory that you may find on your hard drive a directory with a name like jre1.6.0. 7. Check to make sure that you unzipped the documentation correctly. After unzipping the documentation s Zip file, you should have a subdirectory named docsin your Java home directory. So open My Computer and navigate to your new jdkwhateverfolder. Directly inside that folder, you should see a new folder named docs. This directory is called your Javadoc directory. (See Figure 2-2.) Figure 2-2: Your Java home directory should contain a docs directory.
The UK economy was the first in the world to enter the Industrial Revolution, and initially concentrated on heavy industry such as shipbuilding, coal mining, steel production and textiles.All our UK Web Hosting plans are very cheap and they fully support PHP mysql Dreamweaver frontpage and much more.

28 Part I: Getting (Web server hosting) Started If you

Friday, October 5th, 2007

28 Part I: Getting Started If you downloaded the huge offline installation file, your computer extracts the contents of the huge setup file and installs Java from these contents. 3. Among the features that you select to install, make sure you select Development Tools and Public Java Runtime Environment. (See Figure 2-1.) You can choose to have some or all of the components installed. Just make sure that your choice includes these two items. To select or unselect an item, click the icon to the left of the item s name. Figure 2-1: A page of the Java JDK installation wizard. Your Java home directory 4. Jot down the name of the directory in which the Java SDK is being installed and then click Next. From one version to the next, the installation package puts Java in different directories on the computer s hard drive. Lately the package has installed Java in a directory named C:Program FilesJavajdk1. 6.0. During the installation on your computer, you may see a different directory name. (One way or another, the name probably has jdkin it.) Take note of this directory name when the installation package displays it. (Refer to Figure 2-1.) This directory is called your Java home directory. You need the name of this directory in other sections of this chapter and in other chapters of this book.
Need a managed web hosting provider to help maintain your website? Our web hosting service is the preferred choice of thousands of demanding customers.

Chapter 2: Running (Abyss web server) Canned Java Programs 27 The

Friday, October 5th, 2007

Chapter 2: Running Canned Java Programs 27 The huge setup file takes an extra 50MB on your hard drive, but if you ever want to reinstall Java, you have the setup file right where you need it. As you begin downloading the tiny online file or the huge offline setup file, note the directory on your hard drive where the file is being deposited. 8. Return to the Web page that you were visiting in Step 4. On that page, find a link to the Java SE Documentation (also known as the Java SE API Documentation). The Java language has a built-in feature for creating consistent, nicely formatted documentation in Web page format. As a Java programmer, you won t survive without a copy of the Application Programming Interface (API) documentation by your side. You can bookmark the documentation at the java.sun.comsite and revisit the site whenever you need to look up something. But in the long run (and in the not-so-long run), you can save time by downloading your own copy of the API docs. See Chapter 3 for more about the API. 9. Download the API documentation. The documentation comes inside a big Zip file. Just leave this file on your hard drive for now. You don t unzip the file until you read the next section s instructions. Installing Java on your computer After you download the Java JDK, you re ready to install the software on your computer. Of course, you can do this 900 different ways, depending on your operating system, the names of directories on your hard drive, the wind velocity, and other factors. The following steps offer some guidelines: 1. Open My Computer and find the JDK file that you downloaded. The file has a name like jdk-6-blah-blah.exe. The exact name depends on the operating system you re using, the version number that Sun has reached with Java, and whatever naming conventions the people at Sun have changed since this book was written. 2. Double-click the JDK file s icon. What happens next depends on which option you chose in Step 7 of the previous set of instructions. If you downloaded the tiny online installation file, your computer downloads more files from the Internet and installs Java while it downloads.
We are the cheapest Catholic web hosting provider, check Catholic Web Hosting services and make sure of alone.