Instructions for downloading, installing and testing the source code
1. Download the source code zip file from this link.
2. Create a directory in which to install the code. For these instructions, we'll refer to this directory as C:\TIJ4\code.
3. 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.
4. Install Java SE5 from the download site at Sun. Select the "Download JDK 5.0" link. 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.
5. 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.
6. 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.
7. 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.
8. 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.
9. 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).
10. 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."
11. 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;.
12. 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 to get you started; instead, you may want to begin with a more basic editor like JEdit.

大江之中
- 粉丝: 25
- 资源: 5
最新资源
- matlab实现四旋翼无人机自抗扰姿态容错控制-飞行器控制-四旋翼无人机-自抗扰控制-UAV-扰动识别-matlab
- 基于主从博弈的综合能源微网与共享储能优化运行研究:迭代算法探索与利益相关者的博弈策略,基于主从博弈的综合能源微网与共享储能优化运行研究:电价策略与用户行为互动,matlab 代码基于主从博弈的共享储能
- 14章RAG全栈技术从基础到精通 ,打造高精准AI应用
- MATLAB平台下的多目标粒子群算法在冷热电联供综合能源系统优化中的实践,基于多目标粒子群算法的冷热电联供综合能源系统优化调度模型,MATLAB代码:基于多目标粒子群算法冷热电联供综合能源系统运行优化
- 三相桥式全控整流及其有源逆变与Simulink仿真波形分析(含不同触发角和负载变化图),三相桥式全控整流及其有源逆变与Simulink仿真探究:触发角与负载变化下的波形图分析,三相桥式全控整流及其有源
- 中国智能制造装备产业发展机遇蓝皮书 2024.pdf
- 【毕业设计】Python的Django-html网易新闻+评论的舆情热点分析平台源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 西门子1200 PLC与昆仑通态上位软件结合的新能源物料输送系统程序案例解析,V16+博图版本,RS485通讯控制托利多称重仪表模拟量读取技术实现,西门子S1200博图物料输送系统:新能源物料输送PL
- 【毕业设计】Python的Django-html图像的信息隐藏技术研究源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】Python的Django-html深度学习的车牌识别系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】Python的Django-html深度学习屋内烟雾检测方法源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 灰狼算法在微电网优化调度中的应用:考虑风光储与需求响应的多元经济优化策略,模型可塑性强且出图丰富的实践研究,灰狼算法在微电网风光储需求响应优化调度中的应用:经济性优化与模型可塑性的研究分析图集,灰狼算
- 【毕业设计】Python的Django-html人脸识别的实验室智能门禁系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】Python的Django-html深度学习的身份证识别考勤系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】Python的Django-html时间序列分析的大气污染预测系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- matlab实现遗传算法在物流中心配送路径规划中的应用-遗传算法-路径规划-物流配送-最佳配送方案-matlab
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


