Archive for October, 2007

46 Part I: Getting Started The Java programming (Jsp hosting)

Monday, October 22nd, 2007

46 Part I: Getting Started The Java programming language has all the aspects of a spoken language like English. Java has words, grammar, commonly used names, stylistic idioms, and other such things. The grammar and the common names The people at Sun Microsystems who created Java thought of Java as coming in two parts. Just as English has its grammar and commonly used names, the Java programming language has its specification (its grammar) and its Application Programming Interface (its commonly used names). Whenever I write Java programs, I keep two important pieces of documentation one for each part of the language on my desk: The Java Language Specification: This includes rules like, Always put an open parenthesis after the word for and Use an asterisk to multiply two numbers. The Application Programming Interface: Java s Application Programming Interface (API) contains thousands of tools that were added to Java after the language s grammar was defined. These tools range from the commonplace to the exotic. For instance, the tools include a routine named pow that can raise 5 to the 10th power for you. A more razzle-dazzle tool (named JFrame) displays a window on your computer s screen. Other tools listen for the user s button clicks, query databases, and do all kinds of useful things. You can download the Language Specification, the API documents, and all the other Java documentation (or view the documents online) by poking around at java.sun.com/javase/downloads. But watch out! This Web page is a moving target. By the time you read this book, the links in this paragraph will probably be out of date. The safest thing to do is to start at java.sun.com, and then look for links to things like Java SE and documentation. The first part of Java, the Language Specification, is relatively small. That doesn t mean you won t take plenty of time finding out how to use the rules in the Language Specification. Other programming languages, however, have double, triple, or ten times the number of rules. The second part of Java the API can be intimidating because it s so large. The API contains at least 3,000 tools and keeps growing with each new Java language release. Pretty scary, eh? Well, the good news is that you don t have to memorize anything in the API. Nothing. None of it. You can look up the stuff you need to use in the documentation and ignore the stuff you don t need. What you use often, you ll remember. What you don t use often, you ll forget (like any other programmer). For information on how to find things in Java s API documentation, see the section entitled Finding javadoc pages, later in this chapter.
Don’t want to have just any web hosting, but web hosting provider who will share the same beliefs? You have found them. Our Church Web Hosting company will treat in you in appropriate way, the one you are accustomed to.

Chapter 3 Using the Basic Building Blocks In (Tomcat web server)

Sunday, October 21st, 2007

Chapter 3 Using the Basic Building Blocks In This Chapter Speaking the Java language: the API and the Language Specification Understanding the parts of a simple program Documenting your code Editing and running a Java program All great ideas are simple. Leo Tolstoy The quotation applies to all kinds of things things like life, love, and computer programming. That s why this chapter takes a multilayered approach. In this chapter, you get your first blast of details about Java programming. But in discovering details, you see the simplicities. Speaking the Java Language If you try to picture in your mind the whole English language, what do you see? Maybe you see words, words, words. (That s what Hamlet saw.) Looking at the language under a microscope, you see one word after another. The bunch-of-words image is fine, but if you step back a bit, you may see two other things: The language s grammar Thousands of expressions, sayings, idioms, and historical names The first category (the grammar) includes rules like, The verb agrees with the noun in number and person. The second category (expressions, sayings, and stuff) includes knowledge like, Julius Caesar was a famous Roman emperor, so don t name your son Julius Caesar, unless you want him to get beat up every day after school.
The UK has been a member of the European Union since 1973. The attitude of the present government towards further integration is conservative, with the official opposition favoring a return of some powers and competencies to the UK.From our experience, we can recommend Cheap UK Web Hosting services.

44 Part I: Getting Started (Web site construction)

Saturday, October 20th, 2007

44 Part I: Getting Started
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.

Web site translator - Chapter 2: Running Canned Java Programs 43 Figure

Friday, October 19th, 2007

Chapter 2: Running Canned Java Programs 43 Figure 2-13: The mortgage applet runs in your browser window. If you follow the steps in this section and you don t see the mortgage applet running in your Web browser, you can do a few things: Check your Web browser s settings to make sure that the display of Java applets is enabled. Close any browser windows that you have open. Then return to JCreator and choose Build.Execute Project again. Sometimes this helps. Skip the whole applet business and move on to Chapter 3. Hardly anyone uses Java applets these days, anyway.
We feature a web hosting shopping cart and live support solution. Just try our web hosting shopping cartwhich provides a secure way of obtaining payments through your website.

My web site - 42 Part I: Getting Started Running an applet

Thursday, October 18th, 2007

42 Part I: Getting Started Running an applet In this chapter, you can find a sidebar entitled This tag instructs Internet Explorer to look for Compiling and running a Java program. The the Java program named MortgageApplet. sidebar describes the execution of a Java pro-When it finds the program, Internet Explorer disject. To execute a project, your computer runs plays the applet (the text fields, the words a Java Virtual Machine (JVM), and this JVM Principal, Rate, Payment, and other stuff) in the carries a Java program s instructions. That s browser window. how it works for a project that doesn t involve So that s what JCreator does when you want an applets. But when your project involves an applet to be executed. JCreator doesn t run the applet, the story is a bit different. JVM directly. Instead, JCreator tells Internet If you ve worked with Web pages, you may be Explorer to visit an HTML document. Then familiar with something called HTML the Internet Explorer runs the JVM and displays the Hypertext Markup Language. It s the universal applet on a Web page. Have you read about all language for the World Wide Web. Almost every the lawsuits between Microsoft and Sun Web page starts with an HTML file. That s why, Microsystems? At the heart of these lawsuits is when you expand Program0203in JCreator s the use of an outdated JVM in the Internet File View pane, you see something named Explorer browser. MyWebPage.html. By the way, JCreator may be configured to use When JCreator executes the Program0203 Sun s appletviewer instead of Internet Explorer. project, it finds this MyWebPage.html file The appletviewer is a small browser that s and opens this file with Microsoft Internet designed specifically for viewing Java applets. Explorer. At this point, Internet Explorer takes on The appletviewer displays nothing but applets the full burden of running your code. Internet (no hyperlinks, no images, no text other than Explorer acts on the commands (the tags) in the the applet s text) so you can t use appletviewer MyWebPage.htmlfile. In particular, Internet to preview a complete Web page. For tips Explorer finds the following tag inside the on switching between the appletviewer and MyWebPage.htmlfile: Internet Explorer, see this book s Web site. 3. Follow Steps 6 and 7 in the Running a text-based program section. This compiles and runs the Program0203project s code. You see a new Web page containing a mortgage applet in the Web browser window. (See Figure 2-13.)
Adult web hosting has rich experience in providing unique solutions for the customer’s needs, just check frontpage web hosting services.

Ipower web hosting - Chapter 2: Running Canned Java Programs 41 Figure

Wednesday, October 17th, 2007

Chapter 2: Running Canned Java Programs 41 Figure 2-12: A run of the GUI mortgage program. Running a GUI on a Web page (a Java applet) Java s big splash onto the scene came in the mid-1990s. The people at Sun Microsystems had managed to work Java programs into Web pages, and the results were dazzling. The infusion of Java into the Web was powerful, efficient, portable, and secure. The trick was to create a part of a program, called an applet and to display the applet inside a rectangle on the Web page. These days, applets are pass . Real Java programmers roll their eyes when they hear the word applet. Three reasons for this are: Since the mid-1990s, better technologies have emerged for putting eye- catching content onto Web pages. Microsoft, the maker of the world s most powerful Web browser, refused to give its browser the most up-to-date Java tools. For Java programmers, the real money isn t in creating glittery Web pages. The real money is in business applications with Java EE. For more information on Java EE, see Chapter 3. Pass or not, some people still want to create applets. So in this section, you run a simple Java applet. Just follow these steps: 1. If you haven t already done so, follow Steps 1 to 4 from the section entitled Running a text-based program. When you finish with these steps, the Chapter02 workspace is open. 2. In the File View s tree, right-click the branch labeled Program0203. In the resulting context menu, choose Sets As Active Project. This makes Program0203the active project.
We feature a web hosting shopping cart and live support solution. Just try our web hosting shopping cartwhich provides a secure way of obtaining payments through your website.

40 Part I: Getting Started If you installed (Web hosting control panel)

Tuesday, October 16th, 2007

40 Part I: Getting Started If you installed JCreator from this book s CD-ROM, you can find a GUI version of the mortgage-calculating program in a project named Program0202. To run the program, just follow these instructions: 1. If you haven t already done so, follow Steps 1 to 4 from the section entitled Running a text-based program. When you finish with these steps, the Chapter02 workspace is open. JCreator can remember which workspace is open from one launch to another. That way, whenever you restart JCreator, you can skip the steps for opening a workspace (Steps 3 and 4 in the text-based program section). To make JCreator remember, choose Configure.Options in the JCreator menu bar. Then, in the resulting Options dialog, select Workspace.Start Up. In the At Startup drop-down box, select Open Last Workspace. (See Figure 2-11.) Finally, click OK to dismiss the Options dialog. 2. In the File View s tree, right-click the branch labeled Program0202. In the resulting context menu, choose Sets As Active Project. This makes Program0202the active project. 3. Follow Steps 6 and 7 in the Running a text-based program section. This compiles and runs the Program0202project s code. The code displays a window like the one shown in Figure 2-12. In the window, you can experiment and type your own values for the principal, the interest rate, and the number of years of the loan. Whenever you change a value, the program responds instantly by updating the value in the Payment field. Figure 2-11: Telling JCreator to automatically open a workspace.
If you need complete web hosting solution you come to right place,try mac web hosting services.

Hosting your own web site - Chapter 2: Running Canned Java Programs 39 Compiling

Tuesday, October 16th, 2007

Chapter 2: Running Canned Java Programs 39 Compiling and running a Java program What does it mean for JCreator to compile computer and then move the translated file to a your project? A compiler is a tool that trans-Mac, the Mac treats the translated file as pure lates code from one form to another. For garbage. The Mac can t interpret any of the instance, in my Program0201project direc-instructions in the translated file. This is bad for tory, I have a file named MortgageText. many reasons. One of the most striking reasons java. If you look inside the Mortgage is that you can t send this kind of code over Text.javafile, you see code like this: the World Wide Web and expect anyone with a different kind of computer to be able to run import java.io.*; the code. import java.text.NumberFormat; But with Java, you can take a bytecode file that public class MortgageText { you created with a Windows computer, copy public static void the bytecode to who-knows-what kind of com main(String args[]) throws puter, and then run the bytecode with no trou- IOException ble at all. That s one of the many reasons why Although this code isn t easy reading, it cer-Java has become popular so quickly. This outtainly uses letters and other characters that standing feature, which gives you the ability toEnglish-speaking people can understand. This run code on many different kinds of computers, file, MortgageText.java, is called Java is called portability. source code. It s the kind of code that you find After compiling your Java project, choose out how to write by reading this book. It s the Build.Execute from the main menu. At this code that you have before you ve done any point, I normally say that your computer starts compiling before you choose Build.Compile running a Java program. But to be really picky, Project from JCreator s main menu. your computer never actually runs a Java pro- When you choose Build.Compile Project, the gram. Instead, your computer runs somethingcomputer takes your source code and trans-called the Java Virtual Machine (JVM). The use lates it into something called bytecode. The of a virtual machine is another way in which newly created bytecode file is automatically Java is different from other computer program- given a name like MortgageText.class. (You can ming languages. open My Computer and look for the new The Java Virtual Machine is a piece of software. .classfile in your Program0201directory.) Think of the JVM as a proxy, an errand boy, a Unlike the original .javafile, the new .class go-between. The JVM serves as an interpreter file has no recognizable characters in it and isn t between Java s run-anywhere bytecode and suitable for human consumption. Instead, the your computer s own system. As it runs, the .class file is streamlined so that the com- JVM walks your computer through the execu puter can carry out your program s commands tion of bytecode instructions. The JVM exam- quickly and easily. ines your bytecode, bit by bit, and carries outIn the way that it compiles code, Java repre-the instructions described in the bytecode. Thesents a strict departure from most other pro-JVM interprets bytecode for your Windowsgramming languages. When you compile a system, your Mac, your Linux box, or whateverprogram in another language (COBOL or C++, kind of computer you re using. That s a good for instance), you create a file that can be run thing. It s what makes Java programs more on only one operating system. For example, portable than programs in any other language. if you compile a C++ program on a Windows
Pay us little and get a lot! We will give you the cheapest web hosting available, trust us and check cheapest web hosting services.

Fedora web server - 38 Part I: Getting Started Figure 2-10: The

Monday, October 15th, 2007

38 Part I: Getting Started Figure 2-10: The compiling process is completed. 8. Click anywhere inside JCreator s General Output pane, and then type a number, like 100000.00, and press Enter. When you type a number in Step 8, don t include your country s currency symbol and don t use a grouping separator. (U.S. residents, don t type a dollar sign and don t use commas.) Things like $100000.00 or 100,000.00 cause the program to crash. You see a NumberFormatExceptionmessage in the General Output pane. After you press Enter, the Java program displays another message (What s the interest rate?) in JCreator s General Output pane. 9. In response to the interest rate question, type a number, like 5.25, and press Enter. After you press Enter, the Java program displays another message (How many years . . . ?) in JCreator s General Output pane. 10. Type a number, like 30, and press Enter. In response to the numbers that you ve typed, the Java program displays a monthly payment amount. Again, refer to Figure 2-7. (Disclaimer: Your local mortgage company will charge you much more than the amount that my Java program calculates.) When you type a number in Step 10, don t include a decimal point. Things like 30.0 cause the program to crash. You see a NumberFormatExceptionmessage in the General Output pane. Occasionally you decide in the middle of a program s run that you ve made a mistake of some kind. You want to stop the program s run dead in its tracks. To do this, choose Tools.Stop Tool from the main menu. Running a GUI on its own In the previous section, you go through all the steps for compiling and running a text-based Java program. In this section, you go through the same steps for a GUI. The term GUI stands for Graphical User Interface. It s the term used for a program that displays windows, buttons, and other nice-looking stuff. GUI programs are good because, unlike text-based programs, they don t look like they re running on your grandparents computers.
We will hook you up with a JSP web hosting at the great rate, check our jsp web hosting, and join us today!!!

Chapter 2: (Web design company) Running Canned Java Programs 37 5.

Sunday, October 14th, 2007

Chapter 2: Running Canned Java Programs 37 5. In the File View s tree, right-click the branch labeled Program0201. In the resulting context menu, choose Sets As Active Project. (See Figure 2-9.) Figure 2-9: Setting a particular project to be the active project. Choosing Sets As Active Project makes Program0201the active project. In JCreator, only one project at a time can be the active project. To run a particular program, the program s code has to be in whatever project is currently active. In JCreator s File View, you can tell which project is active by looking for the project whose name is displayed in boldface. On some systems, the active project s name is a hazy, light-gray boldface. If a particular program isn t in the active project, you can t run that program, but you can do some other things with that program. For instance, you can see the program in one of JCreator s panes, make changes to the program, save the program, and so on. For this reason, it s really easy to get confused and forget which project is active. So always keep the active project in the forefront of your mind. If your code doesn t do what you think it should do, check to make sure that the project you want to run is the active project. 6. Choose Build.Compile Project from the main menu. Choosing Compile Project does exactly what it says. It compiles the project s code. (To find out what compile means, see the sidebar entitled Compiling and running a Java program. ) After some pleasant chirping sounds from your hard drive, JCreator s bottom pane displays a Process completedmessage. (See Figure 2-10.) 7. Choose Build.Execute Project from the main menu. When you choose Execute Project, the computer runs the project s code. (That is, the computer runs a Java program that I wrote.) As part of the run, the message How much are you borrowing?appears in JCreator s General Output pane. (Refer to Figure 2-7.)
Are you tired of finding web hosting providers listed as inexpensive?Just check our Inexpensive Web Hosting services.