目录
摘要 2
前言 4
第1章 JAVA概述 5
1.1 JAVA 简介 5
1.2
Java的特性 6
1.2.1 Java中输入/输出流概念 6
1.2.2 Socket 机制 6
1.2.3 Java语言 7
1.2.4 JAVA工具 8
第2章 如何使用JAVA来进行
网络编程 10
2.1使用JAVA来进行网络编程 10
2.2客户机/服务器
通信的动机 10
2.3服务器的特权和复杂性 11
2.4无连接的和面向无连接的服务器 11
2.5无状态的和有状态的服务器 12
第3章 网络通信
程序的编写 14
3.1客户机和服务器 14
3.2客户机/服务器通信的实现 14
3.3客户机-服务器范例的应用 16
3.4 Application 同 Applet 的通信 16
3.5 Applet之间的通信 16
3.6程序 17
第4章 程序调试 25
后记 26
参考文献 27
湖北广播电视大学
摘 要
Java是当前最流行的程序
设计语言之一,它的出现大大地促进了
软件产业和互联网的发展。Java之所以如此地流行是因为它是一种简单易学易用的、纯面向对象的、可移植的、安全的、高效的、健壮的、分布式的、多线程的、结构中立的、可解释执行的动态语言。Java拥有包括Sun、IBM在内的世界各大软件厂商的支持,因而发展迅速。随着
计算机技术的发展,网络通信显得越来越重要.计算机技术越成熟,对通信的要求越高,本论文主要阐述了使用JAVA编程语言对基于客户/服务器模式的应用编写网络通信程序以及介绍了Application 同 Applet 的通信和Applet之间的通信,讨论了SOCKET机制、Java中输入输出流以及程序实现代码。
关键词:JAVA,网络,SOCKET,客户/服务器,APPLET
Abstract
Java is the most popular programming language, one of which has significantly contributed to the development of software industry and the Internet. Java is so popular is because it is in a simple and easy to learn, and pure object-oriented, portable, safe, efficient, robust, distributed, multi-threaded, structure neutral, can interpreted dynamic language. Java has, including Sun, IBM, including the world's major software vendors support it, which is developing rapidly. With the development of computer technology, network communications become more and more important. The more sophisticated computer technology, the higher the communication of requirements, present paper mainly elaborates on the use of JAVA programming language based on Client / Server Application network communication procedures and the the Application of communication with the Applet and Applet communication
between the discussed SOCKET mechanism, Java in the input and output streams and program implementation code.
Key
words: JAVA, Internet, SOCKET, client / server, APPLET
前 言
Java作为在Internet上最流行的编程语言,其发展非常迅速。从1995年诞生以来,经过短短的几年发展,如今它已不仅仅是一门语言,而已发展为一门技术,包括Java的芯片技术、Java的编译技术、Java的数据库连接技术、基于Java的信息家电的联网技术、企业信息服务的综合求解
方案技术等等。
Java语言作为一种优秀的面向对象的程序设计语言,具有平台无关性、安全机制、高可靠性和内嵌的网络支持等特点。由于Java语言的这些特点,使得Java语言成为当前网络应用程序编写的首选工具之一。还有人预言,不久的将来,全世界90%的程序代码将用Java语言重写和改写。Java语言和技术的大量使用也促使Java语言本身不断发展。