top of page

Grupo de Estudantes

Público·10 membros

How To Program Java Deitel


2.30 (Separating the Digits in an Integer) Write an application that inputs one number consisting of five digits from the user, separates the number into its individual digits and prints the digits separated from one another by three spaces each. For example, if the user types in the number 42339, the program should print




How to Program Java Deitel



  • There are three products included on this CD-ROM: Java 2 SDK, version 1.2.1 from Sun Microsystems ( ).

  • JBuilder3 University Edition from Borland ( ).

  • NetBeans DeveloperX2 2.1 from NetBeans ( ).

Each of these software applications has its own installation program.If you use Microsoft Internet Explorer as your Web browser, you canrun the installation programs for each of the products listed above directly from this CD-ROM. When you click theinstallation link for a specific program, Internet Explorer will display a dialog boxasking if you would like to open the file from its current location or savethe file to disk. Choose open the file from its current location and click OK.This will launch the installation program for the product. Follow the prompts supplied bythe installation program. Unless you are an experienced programmer, you shouldkeep all the default options specified by the installation program for the product youchose. More specific installation directions are provided for each product below.


If you use Netscape Navigator/Communicator as your Web browser, you should still readand follow these instructions carefully.Unfortunately, clicking the linksto the installation programs for each product only gives you the option of saving theprogram to disk. Please see the more detailed installation instructions below forinformation on installing each product directly from this CD-ROM.


  • JavaTM 2 SDK, Standard Edition, v 1.2.1 Open Windows Explorer.

  • Select the CD-ROM drive in the Folders pane (i.e., the left side of Windows Explorer). Be sure to click directly on the CD-ROM drive and not the + to its left. This will display the contents of the CD-ROM in the contents pane (i.e., the right side of Windows Explorer).

  • Double-click the Java2 SDK directory in the contents pane to display the contents of that directory. The README.html file in this directory contains important information about system requirements and installation.[Note: The installation links on this page link directly to the Sun Microsystem's Web site, so you will need to be connected to the internet to see those pages.]

  • Double-click the Win32 directory. The directory contains the directory jdk1.2.1, the file jdk1_2_1-doc.zip (which may display as jdk1_2_1-doc) and the file jdk1_2_1-win.exe (which may display as jdk1_2_1-win). The jdk1.2.1 directory contains the Java 2 SDK on-line documentation. See Copying the on-line documentation to disk for directions on copying this documentation to your hard disk. The file jdk1_2_1-doc.zip is an archived version of the documentation in the jdk1.2.1 directory. The file jdk1_2_1-win.exe is the installation program.

  • Double-click the file jdk1_2_1-win.exe (on some systems, this will display simply as jdk1_2_1-win) to launch the installation program.

  • You will be lead through a series of steps by an installation wizard.

  • In the Welcome window, click Next >.

  • In the Software License Agreement window, read the agreement, then click Yes if you agree to the terms.

  • In the Choose Destination Location window, click Next >.

  • In the Select Components window, click Next >.

  • The installer will copy files for the Java 2 SDK to your hard disk in the directory c:\jdk1.2.1. Then, the installer will begin the installation for the Java 2 Runtime Environment.

  • In the Software License Agreement window, read the agreement, then click Yes if you agree to the terms.

  • In the Choose Destination Location window, click Next >.

  • The installer will copy files for the Java 2 Runtime Environment to your hard disk in the directory c:\Program File\JavaSoft\Jre\1.2.

  • In the Setup Complete window click Finish.

  • After the installation is complete, carefully read the file c:\jdk1.2.1\README.html. It contains important information about the Java 2 SDK.

  • You will need to create a PATH environment (Windows 95/98, Windows NT) variable that helps your computer locate the Java compiler and Java interpreter on your hard disk.

  • Copying the on-line documentationto disk In the Java2 SDK\Win32 directory on the CD is a directory called jdk1.2.1. This directory contains the documentation for the Java 2 SDK. Simply copy this directory onto your c:\ drive. Doing so will create a docs subdirectory below C:\JDK1.2.1.

  • To view the documentation, open the file c:\jdk1.2.1\docs\index.html in your Web browser. The part of the documentation you will be most concerned with is the API (Application Programming Interface) Specification that can be found at c:\jdk1.2.1\docs\api\index.html. On this page be sure to click the Help link in the upper-right corner of the page to learn how to use the on-line documentation.

  • Creating/Modifying the PATH environment variable in the AUTOEXEC.BATfile for Windows 95/98 Click the Start button (lower-left corner of your screen).

  • Select Run...

  • Type sysedit and press OK. This displays the System Configuration Editor which allows you to edit the autoexec.bat file (and several others).

  • The default file to edit is C:\AUTOEXEC.BAT (the window containing this file is in the foregound).

  • As the last line in this file, add SET PATH=C:\JDK1.2.1\BIN;%PATH%

  • In the File menu, select Save.

  • In the File menu, select Exit.

  • Restart your computer so the changes take effect.

  • Creating/Modifying the PATH environment variable in Windows NT. Click the Start button (lower-left corner of your screen).

  • Go to Settings.

  • Select Control Panel.

  • In the Control Panel, double-click System.

  • Click the Environment tab. This tab contains two areas: System Variables and User Variables.

  • In the User environment variables section, check if there is a PATH variable already defined (you may need to scroll through that part of the window). If not, skip to step 10.

  • Click the PATH variable. This displays PATH in the Variable field at the bottom of the window and the current path setting in the Value field at the bottom of the window.

  • Click in the Value field and use the right arrow key to scroll to the end of the text in that text field. Type the following at the end (NOTE: Be sure to place a semicolon after the current value): ;C:\JDK1.2.1\BIN The semicolon is only required if there is not one already there.

  • Skip to step 12.

  • If the PATH variable is not defined, click in the Variable field at the bottom of the window and type PATH

  • Click in the Value field and type C:\JDK1.2.1\BIN

  • Click the Set button then close the window. It is extremely important that you click Set first, otherwise the new setting will not be saved.

  • You are now ready to use the Java 2 SDK. If you had any Command Prompt windows open before you set the PATH, these will need to be closed and re-opened for the new PATH setting to take effect. You do not need to restart your computer.

Detailed RequirementsThe Java 2 SDK software is available on three platforms: Win32 Version for Windows 95, Windows 98 and Windows NT 4.0 on Intel hardware. A 486/DX or faster processor. 32 megabytes RAM minimum, 48 megabytes RAM recommended. Solaris/SPARC Version. Only Solaris versions 2.5.1, 2.6 and 7 (also known as 2.7) are supported. 32 megabytes RAM minimum, 48 megabytes RAM recommended. Solaris/Intel Version. Only Solaris versions 2.5.1, 2.6 and 7 (also known as 2.7) are supported. A 486/DX or faster processor. 32 megabytes RAM minimum, 48 megabytes RAM recommended. On all systems you should have 65 megabytes of free disk space before attempting to install the Java 2 SDK software. If you also install the separate documentation download bundle, you need an additional 90 megabytes of free disk space. Solaris users will want to check the list of recommended and required patches on the Java Software web site. It is strongly recommended that Solaris 2.6 users load the SUNWi1of package for optional Latin-1 fonts. This package is in the "Entire Distribution" Cluster, available on the Solaris software installation CD-ROM. SUNWi1of contains English Monotype TrueType fonts specified in the font properties files. Without this package, fonts will default to the LucidaSans font for off-screen text and to Type1 font for text in components. For proper installation and configuration of the JavaTM 2 SDK on all platforms, you will need ReadMe information available from Sun's website. The files on this CD link automatically to the proper sources.You must be connected to the Internet to access this information.Install Win32 version Install Solaris/Sparc version Install Solaris/Intel version JavaTM 2 SDK, Standard Edition, v 1.2.1 About JavaTM 2 SDK, Standard Edition, v 1.2.1 Advanced Documentation for JavaTM 2 SDK, Standard Edition, v 1.2.1 For more information: 041b061a72


Informações

Bem-vindo ao grupo! Você pode se conectar com outros membros...

membros

bottom of page