Sunteți pe pagina 1din 2

LESSON-1 OVERVIEW OF JAVA

UNIT-I CHAPTER-1 OBJECT ORIENTED PROGRAMMING CONCEPTS


you can install by downloading the file and clicking the files icon . This version is the easiest to set up. The other version can be downloaded as a series of smaller files that must be assembled after all files have been received. To download the Kit from Sun, visit the World Wide Web page http:// java. Sun . com / j2se / 1.3 /. Although Sun Microsystems has not announced plans to make version 1.3 of the Kit available for other systems , other companies have created implementation of the Java language and development software that supports Java details about these implementations are provided in the Products and APLs section of Sun s official Java site, which is available at http://java .sun.com . If your system can run the Software Development Kit, download it from Suns web site and save it your system in a temporary folder. The file is more than 25 megabytes in size, so you ll have time during the download to make coffee, knit a cardigan, or gnaw your foot off to escape any bear traps it might be caught in. Workshop; installing the Kit After the Software Development Kit has been downloaded to a temporary folder ,you re ready to install it . Suns own installation documentation supplements the information provided during the hour, so be sure to consult it if you have any questions about how the installation should be handled. Lets now start the installation of Java development Kit on your Windows PC

ADVANCED JAVA

1.

Each one of you should open www.sun.com or get it from any other source, the hierarchy of Java Library and present it in the class.

Introduction
Before you can start writing Java programs, you need acquire and set up some kind of Java programming software. Although several different products are available for the development of Java programs, including many terrific once that make programming much easier, the starting place for the most new Java programmers is the Software Development Kit, a set of tools for writing, debugging , and running Java programs. All of the examples in this lesson use the Kit, and you are encouraged to look at all other Java programming tools as you go through the remaining lessons. The material will make more sense to programmers using the Kit , and it builds experience that will be beneficial no matter which development software you use later on.

Objective
The objective of this overview is to help you in downloading the software from the Sun Micro Systems for the kind of Operating System you are using. Here also you will learn the installation and testing procedure of Java.

Lesson in detail
The Software Development Kit is also referred to as the SDK. Whenever Sun releases a new version of Java, the first tool that supports it is the Kit. To create all of the programs in this lesson , you must either use Software Development Kit 1.3 or another Java programming tool that fully supports all of version 1.3 features . There many different software packages that offer the capability to create Java programs, but all of these are not created equally when language support is concerned . Some of these programming tools only support Java 1.0 the initial version of the language , which was released by Sun Microsystems in late 1995. Other tools support Java 1.1, which was released in mid1997. or version 1.2 from 1998.

Window Installation
Window version of the Kit can be installed in three steps; 1. Download the installation file from Sun , saving it in temporary folder on your system. 2. Open the folder the contains the file. 3. Double click the files icon and dialog box will open indicating that the Kits files are being unpacked and installation will being. The Kit will be installed in a folder, with a name based on the version you re downloading , such as \ jdk.3 Click the browse button to select a different folder. After choosing a folder , the Select Components dialog box will ask you to choose which components of the Kit to install. You only need the Program files components accomplish the workshops and tutorial programs in this Course Pack , but you may also find the Demos useful if you can spare the hard disk space. These Java programs were written by Sun to demonstrate different aspects of Java 2. The default setting for the Select Components dialog box should be fine for the work you undertake in this lesson. After

Can you tell , on which Operating systems is Java available ?


At the time of this writing , the Java Software Development Kit 1.3 was available directly from Sun Microsystems for the following systems;

Microsoft Windows 95, 98 Me NT, and 2000 systems Linux systems running on Intel Pentium machines with
Linux kernel version 2.2.12 and glibc version 2.1.2 Solaris SPARC and solaris Intel systems

The window version of the Software Development Kit is provided in two versions . One version is a large EXE file that

3E.773

Copy Right: Rai University

you select components and click Next, the Kit will be installed and you can being using it.

Solaris and Linux Installation


Other versions of the Kit are packed as an archive file that has been compressed to reduce its size. These version may have a filename extension such as . zip, .z, gz, or,. tar in the name , though Sun also is offering the Kit is an archive file which you can run to unpack the archive automatically. The Kit s installation archives should be install into a directory that does not already have a subdirectory called jdk1.3. Otherwise, you might over write some existing files . Next you should make sure you can access the file correctly by using chmod a+x shell command on filename. For example, SPARC users would use the following command.% chamod a+x j2sdk-1-3-0-rcl-linux-rpm .sh To install SDK after making the chmod change, use a shell window to enter the command followed by the archives filename, the following is an example; % sh ./ j2sdk 1-3-0-rc1- linux rpm .sh If you already have ./ in your $ PATH environment variable , you wont have to include it in the command . However, you should consider removing . / from your $ PATH , because it make easier for your personal files to be deleted either by accident or as a result of someones intentionally damaging script. Testing the Installation The Software Development Kit includes a Readme file in the main folder where the Kit was installed. This file gets its name for a good reason; You should read it to find out about any last minute notes from the developers of the Kit . such as bug warnings, changes from the previous version, and solutions to installation problems. Once you have installed the Kit and followed the instruction from suns Web site, it should work right away. When you start using the Kit during the first several lessons of the course pack, the most likely cause of errors will be a misconfigured Kit. You should test the Kit to make sure its working correctly. Window users can test their Kit installation by getting to a command line using one of the following commands; On windows 95, 98 click the start button, choose program, and than click MS-DOS prompt. On windows NT, click the start button, choose program, and than click Command prompt. On windows 2000, click the start button, choose programs , choose Accessories, and than click Command prompt.. These command all have the same result; A window is opened where you can type MS-DOS commands. You explore this feature fully. For now, you need to enter a command that tests whether your system can find the Software Development Kit you just installed, Enter the following in the MS-DOS window; Java-version If you re using version 1.3 of the Kit, you should get the following message in response; Java version 1.3 The version number might be more specific than 1.3 if you have downloaded a newer release of Java Development Kit 1.3, such as 1.3.0, 1.3.1, and the like. The more specific number

should be displayed in response to the java version command.If you see the wrong version number or get a bad command or file name error, your system cant find the right version of java. exe, the program that runs Java programs. This must be corrected before you can start writing Java programs. Configuring the Software Development Kit - to learn how to take care of this problem . Sun Microsystems also offers help on the installation process at http: //java. sun. com/ j2se / 1.3. Official Documentation In addition to the Software Development Kit , Sun Microsystems offer comprehensive documentation for the java language in web page format . You dont need this information to use this course pack because each topic is discussed fully as it is introduced, but these pages will come in handy when you write your own programs. You can download the entire documentation, but it might be more convenient to browse it as needed from Suns Web site. The most up-to-date Java documentation is available at http;// java, sun. com/ j2se/ 1.3/ docs.

ADVANCED JAVA

Now we will stop here and I ask you to summarize what we have done today ? Summary
During this lesson, you were introduced to the concept of programming a computer giving it a set of instructions that tell it what to do. You also downloaded and installed the Software Development Kit that will be used as you write sample programs throughout course. If you are still confused about programs, programming languages, or java in general, thats understandable at this point. Everything will make more sense to you in the next lesson , Writing Your First Program. Which take a slow trip through the process of creating a java program.

Exercises Lesson 1
1. BASIC, C+ +, Java ? What are the names of these languages supposed to mean?

2. Are there more than 1000 books available about Java programming ? 3. Why are the interpreter languages slower than compiled ones?

4. Is C++ harder to learn than Java ?

Home Work
Each one of you should open www.sun.com or get it from any other source, the hierarchy of Java Library and present it in the class.

Suggested Books
1. Thinking in Java, Bruce Eckel, Pearson Education , 2001. 2. Teach Yourself Java 2 in 24 Hours, Sams Techmdeia, Second Edition.

Copy Right: Rai University

3E.773

S-ar putea să vă placă și