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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

本文(CORE JAVA 9Chapter 2Word格式文档下载.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

CORE JAVA 9Chapter 2Word格式文档下载.docx

1、2.1.1. Downloading the JDKTo download the Java Development Kit, visit the web site at be prepared to decipher an amazing amount of jargon before you can get the software you need. SeeTable 2.1for a summary.Table 2.1. Java JargonYou already saw the abbreviation JDK for Java Development Kit. Somewhat

2、confusingly, versions 1.2 through 1.4 of the kit were known as the Java SDK (Software Development Kit). You will still find occasional references to the old term. There is also a Java Runtime Environment (JRE) that contains the virtual machine but not the compiler. That is not what you want as a dev

3、eloper. It is intended for end users who have no need for the compiler.Next, youll see the term Java SE everywhere. That is the Java Standard Edition, in contrast to Java EE (Enterprise Edition) and Java ME (Micro Edition).You will occasionally run into the term Java 2 that was coined in 1998 when t

4、he marketing folks at Sun felt that a fractional version number increment did not properly communicate the momentous advances of JDK 1.2. However, because they had that insight only after the release, they decided to keep the version number 1.2 for thedevelopment kit. Subsequent releases were number

5、ed 1.3, 1.4, and 5.0. Theplatform, however, was renamed from Java to Java 2. Thus, we had Java 2 Standard Edition Software Development Kit Version 5.0, or J2SE SDK 5.0.For engineers, all of this was a bit confusing, but thats why we never made it into marketing. Mercifully, in 2006, sanity prevailed

6、. The useless Java 2 moniker was dropped, and the current version of the Java Standard Edition was called Java SE 6. You will still see occasional references to versions 1.5 and 1.6these are just synonyms for versions 5.0 and 6.Finally, when Oracle makes a minor version change to fix urgent issues,

7、it refers to the change as an update. For example, the first update of the development kit for Java SE 7 is officially called JDK 7u1 and has the internal version number 1.7.0_01. An update does not need to be installed over a prior versionit contains the most current version of the whole JDK.Someti

8、mes, Oracle makes available bundles that contain both the Java Development Kit and an integrated development environment. That integrated environment has, at different times of its life, been named Forte, Sun ONE Studio, Sun Java Studio, and Netbeans. We do not know what the eager beavers in marketi

9、ng will call it when you approach the download site. We suggest that you stay away from all bundles and install only the Java Development Kit at this time. If you later decide to use Oracles integrated development environment, simply download it fromhttp:/netbeans.org.NoteThe setup procedure offers

10、a default for the installation directory that contains the JDK version number, such asjdk1.7.0. This sounds like a bother, but we have come to appreciate the version numberit makes it easier to install a newer JDK release for testing.Under Windows, we strongly recommend that you do not accept a defa

11、ult location with spaces in the path name, such asc:Program Filesjdk1.7.0. Just take out theProgram Filespart of the path name.In this book, we refer to the installation directory asjdk. For example, when we refer to thejdk/bindirectory, we mean the directory with a name such as/usr/local/jdk1.7.0/b

12、inorjdk1.7.0bin.2.1.2. Setting the Executable PathAfter you are done installing the JDK, you need to carry out one additional step: Add thejdk/bindirectory to the executable paththe list of directories that the operating system traverses to locate executable files. Directions for this step also vary

13、 among operating systems. In UNIX (including Linux, Mac OS X, and Solaris), the procedure for editing the executable path depends on the shell you are using. If you use the Bourne Again shell (which is the Linux default), then add a line such as the following to the end of your/.bashrc/.bash_profile

14、file:export PATH=jdk/bin:$PATH Under Windows, log in as administrator. Start the Control Panel, switch to Classic View, and select the System icon. In Windows XP, you immediately get the system properties dialog. In Vista and Windows 7, you need to select Advanced System Settings (seeFigure 2.1). In

15、 the system properties dialog, click the Advanced tab, then click on the Environment button. Scroll through the System Variables window until you find a variable namedPath. Click the Edit button (seeFigure 2.2). Add thejdkbindirectory to the beginning of the path, using a semicolon to separate the n

16、ew entry, like this:jdkbin;other stuffFigure 2.1. Launching the system properties dialog in Windows VistaFigure 2.2. Setting thePathenvironment variable in Windows VistaBe careful to replacejdkwith the actual path to your Java installation, such asjdk1.7.0_02. If you ignored our advice to drop thePr

17、ogram Filesdirectory, enclose the entire path in double quotes:Program Filesjdk1.7.0_02bin;other stuff.Save your settings. Any new console windows that you start will have the correct path.Here is how you test whether you did it right: Start a shell window. Type the linejavac -versionand press the E

18、nter key. You should get a display such as this one:javac 1.7.0_02If instead you get a message such as “javac: command not found” or “The name specified is not recognized as an internal or external command, operable program or batch file”, then you need to go back and double-check your installation.

19、In Windows, follow these instructions to open a shell window. If you use Windows XP, select the Run option from the Start menu and typecmd. In Vista and Windows 7, simply typecmdinto the Start Search field in the Start menu. Press Enter, and a shell window appears.If youve never seen one of these, w

20、e suggest that you work through a tutorial that teaches the basics about the command line, such as2.1.3. Installing the Library Source and DocumentationThe library source files are delivered in the JDK as a compressed filesrc.zip, and you must unpack that file to get access to the source code. We hi

21、ghly recommend that you do that. Simply do the following:1.Make sure the JDK is installed and that thedirectory is on the executable path.2.Open a shell window.3.Change to thedirectory (e.g.,cd /usr/local/jdk1.7.0cd c:jdk1.7.0).4.Make a subdirectorysrc:mkdir srccd src5.Execute the commandjar xvf ./s

22、rc.zip(orjar xvf .src.zipon Windows).TipThesrc.zipfile contains the source code for all public libraries. To obtain even more source (for the compiler, the virtual machine, the native methods, and the private helper classes), go to.The documentation is contained in a compressed file that is separate

23、 from the JDK. You can download the documentation Simply follow these steps:Download the documentation zip file and move it into thedirectory. The file is calledjdk-version-apidocs.zip, whereversionis something like7.directory.jar xvf jdk-version-apidocs.zipwhereis the appropriate version number.2.1

24、.4. Installing the Core Java Program ExamplesYou should also install theCore Javaprogram examples. You can download them from The programs are packaged into a zip filecorejava.zip. You should unzip them into a separate directorywe recommend you call itCoreJavaBook. Here are the steps:Make sure the J

25、DK is installed and thedirectory is on the execution path.Make a directoryCoreJavaBook.Download thecorejava.zipfile to that directory.CoreJavaBook6.jar xvf corejava.zip2.1.5. Navigating the Java DirectoriesIn your explorations of Java, you will occasionally want to peek inside the Java source files.

26、 And, of course, you will need to work extensively with the library documentation.Figure 2.3shows the JDK directory tree.Figure 2.3. Java directory treeThe two most useful subdirectories for learning Java aredocsandsrc. Thedirectory contains the Java library documentation in HTML format. You can view it with any web browser, such as Firefox.Ti

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1