Java技术及SSH框架简介外文翻译资料

 2022-11-10 02:11

Introduction of Java and SSH

Duke, the Java mascotJames Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. Java was originally designed for interactive television, but it was too advanced for the digital cable television industry at the time. The language was initially called Oak after an oak tree that stood outside Goslings office; it went by the name Green later, and was later renamed Java, from a list of random words.Gosling aimed to implement a virtual machine and a language that had a familiar C/C style of notation.

Sun Microsystems released the first public implementation as Java 1.0 in 1995. It promised 'Write Once, Run Anywhere' (WORA), providing no-cost run-times on popular platforms. Fairly secure and featuring configurable security, it allowed network- and file-access restrictions. Major web browsers soon incorporated the ability to run Java applets within web pages, and Java quickly became popular. With the advent of Java 2 (released initially as J2SE 1.2 in December 1998–1999), new versions had multiple configurations built for different types of platforms. For example, J2EE targeted enterprise applications and the greatly stripped-down version J2ME for mobile applications (Mobile Java). J2SE designated the Standard Edition. In 2006, for marketing purposes, Sun renamed new J2 versions as Java EE, Java ME, and Java SE, respectively.

In 1997, Sun Microsystems approached the ISO/IEC JTC1 standards body and later the Ecma International to formalize Java, but it soon withdrew from the process. Java remains a de facto standard, controlled through the Java Community Process. At one time, Sun made most of its Java implementations available without charge, despite their proprietary software status. Sun generated revenue from Java through the selling of licenses for specialized products such as the Java Enterprise System. Sun distinguishes between its Software Development Kit (SDK) and Runtime Environment (JRE) (a subset of the SDK); the primary distinction involves the JREs lack of the compiler, utility programs, and header files.On November 13, 2006, Sun released much of Java as open source software under the terms of the GNU General Public License (GPL). On May 8, 2007, Sun finished the process, making all of Javas core code available under free software/open-source distribution terms, aside from a small portion of code to which Sun did not hold the copyright.Suns vice-president Rich Green has said that Suns ideal role with regards to Java is as an 'evangelist.' Following Oracle Corporations acquisition of Sun Microsystems in 2009–2010, Oracle has described itself as the 'steward of Java technology with a relentless commitment to fostering a community of participation and transparency'.

PrinciplesThere were five primary goals in the creation of the Java language:1.It should be 'simple, object oriented, and familiar'、2.It should be 'robust and secure'.

3.It should be 'architecture neutral and portable'、4.It should execute with 'high performance'、5.It should be 'interpreted, threaded, and dynamic'.

Java PlatformMain articles: Java (software platform) and Java Virtual Machine One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any supported hardware/operating-system platform. This is achieved by compiling the Java language code to an intermediate representation called Java bytecode, instead of directly to platform-specific machine code. Java bytecode instructions are analogous to machine code, but are intended to be interpreted by a virtual machine (VM) written specifically for the host hardware. End-users commonly use a Java Runtime Environment (JRE) installed on their own machine for standalone Java applications, or in a Web browser for Java applets. Standardized libraries provide a generic way to access host-specific features such as graphics, threading, and networking.

A major benefit of using bytecode is porting. However, the overhead of interpretation means that interpreted programs almost always run more slowly than programs compiled to native executables would. Just-in-Time compilers were introduced from an early stage that compile bytecodes to machine code during runtime.ImplementationsSun Microsystems officially licenses the Java Standard Edition platform for Linux, Mac OS X, and Solaris. Although in the past Sun has licensed Java to Microsoft, the license has expired and has not been renewed. Through a network of third-party vendors and licensees, alternative Java environments are available for these and other platforms.

Suns trademark license for usage of the Java brand insists that all implementations be 'compatible'. This resulted in a legal dispute with Microsoft after Sun claimed that the Microsoft implementation did not support RMI or JNI and had added platform-specific features of their own. Sun sued in 1997, and in 2001 won a settlement of US$20 million, as well as a court order enforcing the terms of the license from Sun. As a result, Microsoft no longer ships Java with Windows, and inrecent versions of Windows, Internet Explorer cannot support Java applets without a third-party plugin. Sun, and others, have made available free Java run-time systems for those and other versions of Windows.Platform-independent Java is essential to the Java EE strategy, and an even more rigorous validation is required to certify an implementation. This environment enables portable server-side applications, such as Web services, Java Servlets, and Enterprise JavaBeans, as well as with embedded systems based on OSGi, using Embedded Java environments. Through the new GlassFish project, Sun is working to create a fully functional, unified open source implementation of the Java EE technologies.Sun also distributes a superset of the JRE called the Java Development Kit (commonly known

剩余内容已隐藏,支付完成后下载完整资料


Java技术及SSH框架简介

杜克,被誉为Java吉祥物的James,Mike Sheridan和Patrick Naughton于1991年6月发起了Java语言项Java最初是为交互式电视设计的,但当时对于数字有线电视行业来说太先进了。 这种语言最初被称为橡树,是因为有一颗橡树生长在戈斯林的办公室外面; 它后来被命名为Green,后来被重命名为Java,从这个随机单词列表中Gosling旨在实现一个虚拟机和一个类似于C / C 符号的语言。

Sun Microsystems在1995年发布了第一个公共实现作为Java 1.0。它承诺“一次写入,随处运行”(WORA),在流行平台上提供无成本运行时。 相当安全,并具有可配置的安全性,它允许网络和文件访问限制。主要的Web浏览器很快就融入了在Web页面中运行Java applet的能力,Java很快变得流行起来。 随着Java 2(1998-1999年12月最初作为J2SE 1.2发布)的出现,新版本具有为不同类型的平台构建的多个配置。 例如,J2EE针对企业应用程序和移动应用程序(Mobile Java)的大大精简版J2ME。J2SE指定标准版。在2006年,为了营销目的,Sun将新的J2版本分别重命名为Java EE,Java ME和Java SE。

1997年,Sun Microsystems接近ISO / IEC JTC1标准机构,后来又接近Ecma International正式化Java,但很快退出了这一过程。 Java仍然是一个事实上的标准,通过Java Community Process控制。有一次,Sun大部分的Java实现可以免费使用,尽管它们的专有软件状态。 Sun通过销售Java Enterprise System等专门产品的许可证,从Java获得收入。 Sun区分其软件开发工具包(SDK)和运行时环境(JRE)(SDK的一个子集);主要的区别在于JRE缺乏编译器,实用程序和头文件。2006年11月13日,Sun根据GNU通用公共许可证(GPL)的条款发布了许多Java作为开源软件。 2007年5月8日,Sun完成了这个过程,使得所有的Java核心代码都可以在自由软件/开源分发条款下使用,除了Sun没有持有版权的一小部分代码.Sun的副总裁Rich Green他说,Sun对于Java的理想作用是“传福音”。在甲骨文公司于2009-2010年收购Sun Microsystems后,甲骨文已将自己描述为“管理Java技术,致力于促进社区的参与和透明度。Java语言的创建原则主要有五个主要目标:

1.应该是“简单,面向对象,熟悉”。

2.它应该是“鲁棒和安全的”。

3.应该是“架构中立和便携式”。

4.应该执行“高性能”。

5.应该是“解释,线程和动态”。

Java PlatformMain条款:Java(软件平台)和Java虚拟机Java的一个特性是可移植性,这意味着用Java语言编写的计算机程序必须在任何支持的硬件/操作系统平台上运行。 这是通过将Java语言代码编译为称为Java字节码的中间表示而不是直接到平台特定的机器代码来实现的。 Java字节码指令类似于机器码,但是旨在由专门为主机硬件编写的虚拟机(VM)解释。 最终用户通常使用在自己的机器上安装的Java运行时环境(JRE)用于独立的Java应用程序,或者在Web浏览器中用于Java小应用程序。 标准化库提供了访问特定于主机的功能(如图形,线程和网络)的通用方法。

使用字节码的主要好处是移植。然而,解释的开销意味着解释程序几乎总是比编译为本机可执行文件的程序运行得更慢。即时编译器是从编译字节码到运行时期间的机器代码的早期阶段引入的。实施Microsoft Microsystems正式许可用于Linux,Mac OS X和Solaris的Java Standard Edition平台。虽然过去Sun已将Java许可授予Microsoft,但许可证已过期,且尚未续订。通过第三方供应商和许可证的网络,备选的Java环境可用于这些平台和其他平台。

Sun使用Java品牌的商标许可证坚持所有实施都是“兼容的”。这导致与Microsoft的法律纠纷,Sun声称Microsoft实现不支持RMI或​​JNI,并添加了自己的平台特定功能。 Sun于1997年起诉,2001年获得了2,000万美元的和解,以及一个法院命令,执行Sun的许可证条款。因此,Microsoft不再为Windows提供Java,在Windows的早期版本中,Internet Explorer无法在没有第三方插件的情况下支持Java applet。 Sun等为Windows和其他版本的Windows提供了免费的Java运行时系统。独立于平台的Java是Java EE战略的基础,需要更严格的验证来验证实现。此环境支持便携式服务器端应用程序,例如Web服务,Java Servlet和Enterprise JavaBeans,以及使用嵌入式Java环境的基于OSGi的嵌入式系统。通过新的GlassFish项目,Sun正在努力创建一个功能齐全,统一的Java EE技术的开源实现.Sun还分发了一个名为Java Development Kit(通常称为JDK)的JRE超集,其中包括开发工具例如Java编译器,Javadoc,Jar和调试器。

Java性能和垃圾收集器

用Java编写的程序比用C语言编写的程序慢,需要更多的内存。然而,随着1997/1998年Java的即时编译的推出,Java程序的执行速度显着提高,添加支持更好的代码分析(如内部类,StringBuffer类,可选断言等)的语言特性,以及Java虚拟机本身的优化,例如HotSpot在2000年成为Sun的JVM的默认设置。目前, Java代码的性能大约是C代码的一半。

一些平台为Java提供直接硬件支持;有可以在硬件而不是软件JVM中运行Java的微控制器,并且基于ARM的处理器可以具有硬件支持,以通过其Jazelle选项来执行Java字节码。自动内存管理Java使用自动垃圾收集器来管理对象生命周期中的内存。程序员确定何时创建对象,并且一旦对象不再使用,Java运行时负责恢复内存。一旦没有对对象的引用,则不可达的内存变得有资格被垃圾收集器自动释放。如果程序员的代码保持对不再需要的对象的引用,通常当不再需要的对象存储在仍在使用的容器中时,仍然可能发生类似于内存泄漏的事情。如果调用不存在的对象的方法,则抛出“空指针异常”。

Java自动内存管理模型背后的一个想法是,程序员可以免除必须执行手动内存管理的负担。在某些语言中,用于创建对象的内存被隐式地分配在堆栈上,或者显式地从堆中分配和释放在里面。后者情况下管理内存的责任在于程序员。如果程序不释放对象,则会发生内存泄漏。如果程序试图访问或释放已经解除分配的内存,结果是未定义的,难以预测,并且程序可能变得不稳定和/或崩溃。这可以通过使用智能指针部分地补救,但是这些增加开销和复杂性。注意,垃圾收集不能防止“逻辑”内存泄漏,即那些内存仍被引用但从未使用的内存泄漏。

垃圾收集可能在任何时间发生。理想情况下,它会在程序空闲时发生。它保证在堆上没有足够的可用内存来分配一个新对象时被触发;这可能导致程序暂停。在Java中不可能进行显式内存管理。

Java不支持C / C 风格的指针算术,其中对象地址和无符号整数(通常为长整数)可以互换使用。这允许垃圾收集器重新定位引用对象并确保类型的安全性和安全性。在C 和一些其他面向对象语言中,Java的原始数据类型的变量不是对象。原始类型的值直接存储在字段(对于对象)或堆栈(对于方法)而不是堆上,对于对象通常是真实的(但请参阅Escape分析)。这是Java的设计师出于性能原因的有意识的决定。因此,Java不被认为是一种纯粹的面向对象的编程语言。但是,从Java 5.0开始,自动装箱使程序员能够继续进行,就像原始类型是其包装类的实例一样。 Java包含多种类型的垃圾收集器。默认情况下,HotSpot使用并发标记扫描收集器,也称为CMS垃圾收集器。然而,还有几个其他垃圾收集器可以用来管理堆。对于90%的Java应用程序,CMS垃圾收集器是足够好的。

未声明为public的类可以存储在任何.java文件中。编译器将为源文件中定义的每个类生成一个类文件。类文件的名称是类的名称,附加.class。对于类文件生成,匿名类被视为它们的名称是它们的封闭类的名称的连接,$和整数。

关键字public表示可以从其他类中的代码调用方法,或者类可以由类层次之外的类使用。类层次结构与.java文件所在的目录的名称相关。

方法前面的关键字static表示一个静态方法,它只与类关联,而不与该类的任何特定实例关联。只有静态方法可以被调用而不引用对象。静态方法不能访问任何非静态的方法变量。

关键字void表示main方法不向调用者返回任何值。如果Java程序要以错误代码退出,它必须显式调用System.exit()。

方法名“main”不是Java语言中的关键字。它只是Java启动程序调用来将控制传递给程序的方法的名称。在托管环境中运行的Java类(如applet和Enterprise JavaBean)不使用或需要main()方法。一个java程序可能包含多个具有主要方法的类,这意味着VM需要明确地告诉从哪个类启动。

main方法必须接受一个String对象数组。按照惯例,它被引用为args,尽管可以使用任何其他合法的标识符名称。从Java 5开始,main方法也可以使用变量参数,形式为public static void main(String ... args),允许使用任意数量的String参数调用main方法。此替代声明的效果在语义上是相同的(args参数仍然是String对象的数组),但允许创建和传递数组的替代语法。

Java启动器通过加载给定的类(在命令行中指定或作为JAR中的属性)并启动其public static void main(String [])方法来启动Java。独立程序必须明确声明此方法。 String [] args参数是一个String对象数组,包含传递给类的任何参数。主要的参数通常通过命令行传递。

Java的批评

对于语言和平台中的各种设计选择,已经对Java编程语言进行了许多批评。这些批评包括泛型的实现,无符号数的处理,浮点运算的实现和安全漏洞。

Java类库

Java平台和类库diagramJava库是由JRE实现者开发的用于支持Java中应用程序开发的源代码的编译字节码。这些库的示例包括:

核心库,包括:

实现数据结构(如列表,字典,树,集,队列和双端队列或堆栈)的集合库

XML处理(解析,转换,验证)librariesSecurity国际化和本地化库

集成库,允许应用程序编写器与外部系统通信。这些库包括:

用于数据库访问的Java数据库连接(JDBC)API

用于查找和发现的Java命名和目录接口(JNDI)

RMI和CORBA用于分布式应用程序开发

JMX用于管理和监视应用程序

用户界面库,包括:

(重量级或本地)抽象窗口工具包(AWT),它提供GUI组件,布局这些组件的方法以及从这些组件处理事件的方法

(轻量级)Swing库,它们是基于AWT构建的,但提供了(非本地)AWT构件的实现

用于音频捕获,处理和播放的API

Java虚拟机(JVM)的平台依赖实现,它是Java库和第三方应用程序的字节代码执行的手段

插件,它允许小程序在Web浏览器中运行

Java Web Start,它允许Java应用程序通过Internet有效地分发给最终用户

许可和文件。

文档:Javadoc

Javadoc是一个由Sun Microsystems创建的综合文档系统,由许多Java开发人员使用。它为开发人员提供了一个有组织的系统来记录他们的代码。 Javadoc注释在开头有一个额外的星号,即标签是/ **和* /,而Java和C中的正常多行注释标签注释用/ *和* /表示。

Sun已定义并支持面向不同应用程序环境的四个版本的Java,并将其许多API分段,以使它们属于其中一个平台。平台是:Java Card for smartcards。Java Platform,Micro Edition(Java ME) - 面向有限资源的目标环境,Java平台,标准版(Java SE) - 面向大型分布式企业或Internet环境的工作站环境,Java Platform,企业版(Java EE)。 Java API中的类被组织成称为包的单独组。每个包都包含一组相关的接口,类和异常。有关可用包的描述,请参阅单独的平台。这些API由Sun Microsystems通过Java Community Process程序与他人合作控制。参与此过程的公司或个人可以影响API的设计和开发。这个过程是一个争议的主题。 Sun还提供了一个名为PersonalJava的版本,后来被基于标准的Java ME配置文件配对所取代。

JSP配置文件

JSP(JavaServer Pages)由Sun Microsystems公司发起,与许多公司一起参与建立一个动态网页技术标准。 JSP技术有点类似于ASP技术,它是在传统的HTML网页文档(* .htm,*。html)中插

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[137989],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。