Thinking in Java 4th Edition Source Code
Thinking in Java 4th Edition Source Code
Instructions for downloading, installing and testing the source code
- Download the source code zip file from this link.
- Create a directory in which to install the code. For these instructions, we'll refer to this directory as C:\TIJ4\code.
- Using Winzip or some other zip utility, extract the zip file into the C:\TIJ4\code directory. When you're done, you should see several levels of directories, and in the C:\TIJ4\code directory, you'll see, among other things, subdirectories corresponding to the chapters in the book.
- Install the Java JDK SE5 or later from the download site at Sun. You'll also eventually want the documentation, which is available further down on that page. You may also choose to install Java SE6; the code will work with that as well. Note that the most reliable approach is to install to the default directories.
- Add the bin directory of your JDK to your path.
- Set the CLASSPATH in your computer's environment. For Windows machines, right-click on the "My Computer" icon and select "Properties." Then select the "Advanced" tab and click the "Environment Variables" button at the bottom. Under "System Variables," look to see if there's already a "CLASSPATH" variable. If there is, double click and add
;.;..;C:\TIJ4\code;
to the end of the current entry. If there is no "CLASSPATH" variable, click the "New" button and enter
CLASSPATH
In the "Variable name" box, and
.;..;C:\TIJ4\code;
In the "Variable value" box, then click "OK". To verify that your classpath has been set, start a command prompt (see below), then enter set and look for the CLASSPATH information in the output. - Install the Ant build tool by following the instructions you will find in the Ant download. Note: Ant is not required in order to compile the examples in the book. It is used to automate the process, but you can also compile each example individually (once you have the CLASSPATH set, as described above) using the javac command-line compiler that was installed when you completed the previous step (note that you may have to set the Windows PATH to point to javac.exe). To compile a file called MyProgram.java, you type javac MyProgram.java.
- Start a command prompt in the C:\TIJ4\code directory. To do this in Windows, press the "Start" button, then select "Run" and type "cmd" and press "OK." then type
cd C:\TIJ4\code
into the resulting command window. - At this point you should be able to start a command prompt in C:\TIJ4\code and type ant build, and the build should successfully compile all the chapters up to the io chapter, where it will fail with an error message about a missing library. If you only need to work with chapters before io for now, this will suffice for awhile.
- You can also move into individual chapters and type ant (to compile and execute the code in that chapter) or ant build (to compile the code only).
- To build the entire code base, you'll need to install the additional libraries. These include:
- XOM
- Javassist
- The javaws.jar library, which comes with the standard Java installation, but which you must explicitly place in your classpath (described below).
- The Eclipse SWT library. Click on the most recent build number, then scroll down to "SWT Binary and Source" and select the file corresponding to your platform. Further details about finding the jar file are in the book under the heading "Installing SWT."
In general, you can install the above Jar files by placing them in the jre/lib/ext directory that is part of the "Java Runtime" that will be set up when you install the Java SE5 or Java SE6 development kit. You may have to hunt around for the JRE, but it can often be found under your "Program Files" directory, under "Java."
- Alternatively, you can explicitly install each of the Jar files. To do this, you must add each one to your CLASSPATH, following the directions shown earlier on this page. However, you must also include the name of the Jar file in the CLASSPATH entry. For example, if you put the xom.jar file in a directory called C:\TIJ4\libraries\, then the associated CLASSPATH entry would be C:\TIJ4\libraries\xom.jar;.
- This code is designed to work outside of IDEs. Because packages are not introduced until later chapters, and some of the fancier IDEs like Eclipse require all code to be in packages, if you want to use the code inside those IDEs you will have to make some adjustments (however, see the Eclipse.py program in the download package for some help). Different IDEs have different requirements and it may be more trouble than it's worth while you're getting started; instead, you may want to begin with a more basic editor like JEdit.
You may also want to add yourself to the low-volume newsletter to find out about future books, supplements, seminars and public speaking events by Bruce Eckel.
Return to Thinking in Java 4th Edition
Thinking in Java 4th Edition Source Code的更多相关文章
- [转]Native Java Bytecode Debugging without Source Code
link from:http://www.crowdstrike.com/blog/native-java-bytecode-debugging-without-source-code/index.h ...
- Artistic Style 3.1 A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, Objective‑C, C#, and Java Source Code
Artistic Style - Index http://astyle.sourceforge.net/ Artistic Style 3.1 A Free, Fast, and Small Aut ...
- Java Sound : generate play sine wave - source code
转载自:http://ganeshtiwaridotcomdotnp.blogspot.com/2011/12/java-sound-generate-play-sine-wave.html Work ...
- Sound (audio file) player in java - working source code example
转载自:http://ganeshtiwaridotcomdotnp.blogspot.com/2011/12/sound-audio-file-player-in-java-working.html ...
- 转: Source Code Lookup in Eclipse(主要讲的是java的)
Source Code Lookup in Eclipse https://www.intertech.com/Blog/source-code-lookup-in-eclipse/
- view class source code with JAD plugin in Eclipse
The default class viewer doesn't decompile the class file so you cannot open and check the source co ...
- Attach source code to a Netbeans Library Wrapper Module
http://rubenlaguna.com/wp/2008/02/22/attach-source-code-to-a-netbeans-library-wrapper-module/ Attach ...
- Memcached source code analysis (threading model)--reference
Look under the start memcahced threading process memcached multi-threaded mainly by instantiating mu ...
- 3 Ways of JDK Source Code Attachment in Eclipse---reference
You wanna look at a JVM class while you are coding and you cannot. Here is the solution. First of al ...
- 《Algorithms 4th Edition》读书笔记——3.1 符号表(Elementary Symbol Tables)-Ⅳ
3.1.4 无序链表中的顺序查找 符号表中使用的数据结构的一个简单选择是链表,每个结点存储一个键值对,如以下代码所示.get()的实现即为遍历链表,用equals()方法比较需被查找的键和每个节点中的 ...
随机推荐
- 前端基于 radio 增强单选框组件
前端基于radio增强单选框组件, 下载完整代码请访问uni-app插件市场地址:https://ext.dcloud.net.cn/plugin?id=12977 效果图如下: # ## ...
- LLM技术在自然语言处理中的实践与改进
目录 <LLM技术在自然语言处理中的实践与改进> 引言 自然语言处理 (NLP) 是人工智能领域的一个重要分支,它研究如何将计算机程序与人类语言进行交互,从而理解.分析.生成和翻译文本.近 ...
- P3133 [USACO16JAN] Radio Contact G 无线电通话
P3133 [USACO16JAN] Radio Contact G 无线电通话 目录 P3133 [USACO16JAN] Radio Contact G 无线电通话 [USACO16JAN] Ra ...
- 从Excel 电子表格中读取数据并插入到数据库的简单方式
using (FileStream fileStreamRead = new FileStream("new.xls" , FileMode.Open )) { //创建工作簿 I ...
- iOS Block笔记总结
前言: 对block的简单笔记总结, 1.本质: 封装了函数调用和函数调用环境的对象 2.block结构: 3.block捕获变量: 由于需要跨函数访问变量,所以需要捕获变量,(防止访问时已被销毁) ...
- 【SpringBoot】WebSocket在线聊天
先看一下页面效果,有点简单粗暴!哈哈哈哈哈,别介意. 本文参考:SpringBoot2.0集成WebSocket,实现后台向前端推送信息 新建一个springboot项目 引入相关依赖 <dep ...
- 即构携手智能对讲机品牌Runbo,打造可视化对讲通信系统
现代通信技术的发展,让信息的传递变得前所未有的便捷.作为双向移动通信工具,对讲机不需要网络支持就可以进行通话,且没有话费产生,尤其适合酒店.物业等使用区域固定.通话频繁的场景. 随着技术的不断迭代,对 ...
- C语言指针--一级指针
文章目录 前言 一.什么是指针 二.一级指针的使用 1.一级指针的创建 2.指针的赋值 3.&是什么 4.一维指针的使用 4.1 `变量` 和 `*变量` 4.2 输出指针变量内容 4.3 改 ...
- CSS: 绝对定位fixed
属性介绍 元素会被移出正常文档流,并不为元素预留空间,而是通过指定元素相对于屏幕视口(viewport)的位置来指定元素位置.元素的位置在屏幕滚动时不会改变.打印时,元素会出现在的每页的固定位置.fi ...
- Unity的IPostprocessBuildWithReport:深入解析与实用案例
Unity IPostprocessBuildWithReport Unity IPostprocessBuildWithReport是Unity引擎中的一个非常有用的功能,它可以让开发者在构建项目后 ...