ImageVerifierCode 换一换
格式:DOCX , 页数:22 ,大小:998.28KB ,
资源ID:613275      下载积分:15 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-613275.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(【精品文档】433关于计算机专业网页小程序有关的外文文献翻译成品:JavaWebStart和小应用程序Applets中英文双语对照11.docx)为本站会员(聆听****声音)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

【精品文档】433关于计算机专业网页小程序有关的外文文献翻译成品:JavaWebStart和小应用程序Applets中英文双语对照11.docx

1、此文档是毕业设计外文翻译成品( 含英文原文+中文翻译),无需调整复杂的格式!下载之后直接可用,方便快捷!本文价格不贵,也就几十块钱!一辈子也就一次的事!外文标题:Java Web Start and Applets外文作者:David Parsons文献出处: Foundational Java,2019,pp 503-527 (如觉得年份太老,可改为近2年,毕竟很多毕业生都这样做)英文3584单词,19270字符(字符就是印刷符),中文5622汉字。(如果字数多了,可自行删减,大多数学校都是要求选取外文的一部分内容进行翻译的。)Java Web Start and AppletsIn its

2、 early days, Java came to prominence because of Java applets, running in web browsers. Applets have had something of a checkered history since then, and most Java web technologies belong in the enterprise edition rather than the standard edition of Java. However, applets are still widely used, and c

3、an be a useful component of rich Internet applications. Also associated with the web, but less directly, is Java Web Start, which allows desktop applications to be deployed over the web. In this chapter, we will begin by looking at Java Web Start and then look at applets, which can now use the same

4、deployment mechanism as Java Web Start, making it very easy to switch between the two modes of deployment. Since both Java Web Start and applets require us to create web pages with appropriate links to Java applications or applets, we will begin with brief overviews of web browsers, URLs, and HTML.2

5、0.1Web Browsers, URLs, and HTML PagesWeb browser software (e.g., Explorer, Firefox, Safari, Chrome, etc.) is designed to retrieve information from remote sites on the World Wide Web (WWW) using Uniform Resource Locators (URLs). Much of the information is made available in the form of HTML (HyperText

6、 Markup Language) web pages.20.1.1URLsA URL is basically the Internet address of a resource on a particular server, and typically is written in three parts: the protocol, the server address, and the name of the resource (including any path information).20.1.1.1The HTTP ProtocolThe protocol prefix fo

7、r web pages is “http:/”. This stands for “hypertext transfer protocol” and most URLs start this way. Indeed this part is often omitted, because it is usually the browsers default protocol (though there are other web protocols that you may be familiar with such as FTP, the File Transfer Protocol).20.

8、1.1.2The Server AddressThe server address usually begins with “www” (World Wide Web), followed by the name of the site and its “domain,” which defines its category and may include its country code. Each of these is separated by a period (full stop). Take, for example, the following URL:“introjava” i

9、s the name of the server site and “com” means a company. Common alternatives to “com” are “edu” for academic institutions and “org” for organizations. Many URLs are within a country domain, such as “.co.uk” or “.ac.nz”. If you are running a test server on your local machine, the domain name becomes

10、“localhost.”20.1.1.3The Path and Resource NameThe final part of a URL can include the location (directory) and name of the particular file at the site. For example,This looks for the file “getinvolved.html” in the “foundation” directory. The file name will generally end in “html” (or sometimes just

11、“htm”) because it will usually be a file written in HTML (see below). If no file name is specified, “index.html” is often the servers default file name that it will send back to the browser. If no index file is present, then a directory listing may be displayed instead, or an error page, depending o

12、n the servers configuration.20.1.2 HTML (HyperText Markup Language)Web browsers display screens of information written using HTML (HyperText Markup Language). The browser takes the basic information stored in the HTML file and formats it appropriately using tags embedded into the text of the file. A

13、ll HTML files begin with an tag and end with . Most HTML tags are terminated like this, using a forward slash followed by the tag name. This is a very simple HTML file, showing additional tags for the page header (, which can include a title ), the main body of the text (), and some text. Header tag

14、s (such as ) can be used to format the size of text. The tag is used to specify paragraphs. The “DOCTYPE” at the top the file specifies the version of HTML that is being used. This example uses HTML 5 (different DOCTYPES have different expectations about how the document should be structured).Figure

15、 20.1 shows what this page looks like when loaded into a browser as a local file. Simple files can easily be written by hand, but for more complex pages it is better to use one of the many available HTML editing tools. Some simple HTML pages will be needed to launch the applications and applets desc

16、ribed in this chapter.20.2Java Web StartJava Web Start is a generic Rich Internet Application (RIA) launch mechanism that can be used to deploy both desktop applications and applets. It provides a way to easily deploy applications via the web, and provides an alternative to some other types of web d

17、eployment, such as some server side web applications, though it primarily eases the deployment of desktop applications. A Java Web Start application can be self-contained, because it can automatically download and install a JRE. Programmers can specify which JRE version a given program needs in orde

18、r to execute and ensure that it is available for the application to run. Although it is a web-based deployment mechanism, no Internet connection is required to execute the applications once they have been downloaded.The core components of a Java Web Start deployment are: the application to be deploy

19、ed, a Java Network Launch Protocol (JNLP) file, and a web (HTML) page to host the application launcher. The Java application needs to be archived in a JAR file with an identifiable “main” class that serves as the program entry point. As we saw in Chap. 14, a JAR provides a single unit of deployment,

20、 and can specify a main class in its manifest. Having the “main” class identified in the manifest is not essential for Java Web Start since we can also specify the main class in the JNLP file, but it is useful not to rely entirely on the JNLP file to specify a main class.The JNLP file is an XML file

21、 that describes how the application should be launched. It contains deployment-related information such as the name of the JAR file, the main class in the JAR, and the minimum version of Java required to run the application. The web page can either contain a simple hyperlink to the JNLP file or it c

22、an use a JavaScript button to launch the application. Normally, we would also need to set up a web application so that the files can be downloaded over the web from a server. However, for testing purposes it is possible to deploy a Java Web Start application using a local HTML file, which we will do

23、 for the first example, which deploys the Distance Viewer application from Chap. 18.20.2.1Creating a JAR in EclipseThe first step is to create a JAR file containing the required classes. This could of course be built using an Ant script, which we will do later in this chapter, but we will describe t

24、he first step in this example using the Eclipse export facility. Figure 20.2 shows the key steps in the dialogs that export files from Eclipse. The first step is to select “export” from the “file” menu, which will open the “Export” dialog shown in Fig. 20.1. In this dialog, within the “Java” folder

25、you can select “JAR File” as the type of export. Clicking the “Next” button takes you to the “JAR Export” dialog. It is essential here to choose all of the files that need to be in the archive. For the “DistanceViewer” application, you need to export not only the DistanceViewer class itself (the vie

26、w), but the Flight Distances class as well (the model). The lower part of the dialog lets you select the export folder and the name of the JAR file. Clicking “Next” takes you to the final stage of the dialog where you can select one of the classes in the JAR as the class used as the application entr

27、y point. Clicking “Finish” creates the JAR file.20.2.2Java Network Launch Protocol (JNLP)The Java Network Launch Protocol (JNLP) enables a desktop application to be launched from resources hosted on a web server. Java Web Start requires a JNLP file that configures the various aspects of the protocol

28、.This can be created as a text file in Eclipse, with a “jnlp” extension. It needs to be explicitly opened in a text editor or Eclipse may attempt to run it directly (right-click on the file and choose “open with”, then select “text editor”). The following example contains the basic information requi

29、red in a JNLP file. The “information” element requires “title” and “vendor” information. The “resources” element specifies the minimum version of Java required to run the application (with the URL of the automatic download site for the Java runtime), and the name of the JAR file. Finally the “applic

30、ationdesc” element specifies the name of the main class to be run from the JAR. This particular JNLP file has been written using the required elements from Java Web Start version 1; hence, the “spec” attribute is set to “1.0+” (this is actually the default).Note that the “codebase” and “href” attrib

31、utes are empty in this example they are not required when testing local files.Hyperlinks do not particularly stand out on a web page. Another way of launching a Java Web Start application is to use a JavaScript button to launch the application. This fragment of JavaScript uses the “deployJava.create

32、WebStartLaunchButton” method that is available over the web from the “deployJava.js” file. The code that processes it uses the “href” property of the JavaScript “location” object to locate the JNLP file relative to the URL of the web page.20.2.3Deploying to a ServerSo far we have only tested our Web Start applications using local files, but of course Web Start applications need to be deployed to a server in order to be downloaded over the Internet. In this section, we will cover the basics of deploying a Web Start application to the Tomcat

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2