The Java® programming language is a general-purpose, concurrent, object-oriented language. Its syntax is similar to C and C++, but it omits many of the features that make C and C++ complex, confusing, and unsafe. The Java platform was initially developed to address the problems of building software for networked consumer devices. It was designed to support multiple host architectures and to allow secure delivery of software components. To meet these requirements, compiled code had to survive transport across networks, operate on any client, and assure the client that it was safe to run.
The popularization of the World Wide Web made these attributes much more interesting. Web browsers enabled millions of people to surf the Net and access media-rich content in simple ways. At last there was a medium where what you saw and heard was essentially the same regardless of the machine you were using and whether it was connected to a fast network or a slow modem.
Web enthusiasts soon discovered that the content supported by the Web's HTML document format was too limited. HTML extensions, such as forms, only highlighted those limitations, while making it clear that no browser could include all the features users wanted.Extensibility was the answer.
The HotJava browser first showcased the interesting properties of the Java programming language and platform by making it possible to embed programs inside HTML pages. Programs are transparently downloaded into the browser along with the HTML pages in which they appear. Before being accepted by the browser, programs are carefully checked to make sure they are safe. Like HTML pages, compiled programs are network- and host-independent. The programs behave the same way regardless of where they come from or what kind of machine they are being loaded into and run on.
A Web browser incorporating the Java platform is no longer limited to a predetermined set of capabilities. Visitors to Web pages incorporating dynamic content can be assured that their machines cannot be damaged by that content. Programmers can write a program once, and it will run on any machine supplying a Java run-time environment.
Java® 编程语言是一种通用的、支持并发的、面向对象的语言。它的语法与 C 和 C++ 相似,但省略了许多使 C 和 C++ 变得复杂、混乱且不安全的特性。Java 平台最初是为了应对为联网消费设备构建软件时所遇到的问题而开发的。它被设计为支持多种主机架构,并允许安全地交付软件组件。为了满足这些要求,编译后的代码必须能够经受住跨网络传输的考验,在任何客户端上运行,并向客户端保证运行该代码是安全的。
万维网(World Wide Web)的普及使得这些特性变得更加引人注目。Web 浏览器使数百万人能够以简单的方式浏览网络并访问富媒体内容。终于出现了一种媒介,无论你使用何种机器,无论它是连接到高速网络还是低速调制解调器,你所看到和听到的内容基本上是一致的。
Web 爱好者很快发现,Web 的 HTML 文档格式所支持的内容过于有限。HTML 的扩展功能(例如表单)只是突显了这些局限性,同时也清楚地表明,没有任何一款浏览器能够包含用户想要的所有功能。可扩展性才是答案。
HotJava 浏览器首次展示了 Java 编程语言和平台的有趣特性,它使得将程序嵌入 HTML 页面成为可能。程序会与它们所出现的 HTML 页面一起被透明地下载到浏览器中。在被浏览器接受之前,程序会经过仔细检查,以确保其安全性。与 HTML 页面一样,编译后的程序具有网络无关性和主机无关性。无论程序来自何处,或被加载到何种机器上运行,其行为都保持一致。
集成了 Java 平台的 Web 浏览器不再局限于一组预定义的功能。访问包含动态内容的网页的用户可以确信,他们的机器不会被这些内容所损害。程序员可以“一次编写”,程序就能在任何提供 Java 运行时环境的机器上运行。