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()方法比较需被查找的键和每个节点中的 ...
随机推荐
- 6大数据实战系列-sparkSql实战
sparkSql两个最重要的类SqlContext.DataFrame,DataFrame功能强大,能够与rdd互转换.支持sql操作如sql().where.order.join.groupBy.l ...
- 高可用只读,让RDS for MySQL更稳定
摘要:业务应用对数据库的数据请求分写请求(增删改)和读请求(查).当存在大量读请求时,为避免读请求阻塞写请求,数据库会提供只读实例方案.通过主实例+N只读实例的方式,实现读写分离,满足大量的数据库读取 ...
- MODBUS-TCP转Ethernet IP 网关连接空压机 配置案例
本案例是工业现场应用捷米特JM-EIP-TCP的Ethernet/IP转Modbus-TCP网关连接欧姆龙PLC与空压机的配置案例.使用设备:欧姆龙PLC,捷米特JM-EIP-TCP网关, ETH ...
- Mybatis-SQL分析组件
背景 大促备战,最大的隐患项之一就是慢sql,带来的破坏性最大,也是日常工作中经常带来整个应用抖动的最大隐患,而且对sql好坏的评估有一定的技术要求,有一些缺乏经验或者因为不够仔细造成一个坏的sql成 ...
- RocketMq5.0 任意延迟时间 TimerMessageStore 源码解析
TimerMessageStore 简略介绍 延迟队列 rmq_sys_wheel_timer 指定时间的延迟消息.会先投递到 rmq_sys_wheel_timer 队列中 然后由 TimerMes ...
- go web学习(五)
跟着刘旭老师学go web做的笔记 [Go Web 编程快速入门[Golang/Go语言](完结)] https://www.bilibili.com/video/BV1Xv411k7Xn/?p=27 ...
- 2023-07-12:RocketMQ如何做到消息不丢失?
2023-07-12:RocketMQ如何做到消息不丢失? 答案2023-07-12: RocketMQ通过刷盘机制.消息拉取机制和ACK机制等多种方式来确保消息投递的可靠性,防止消息丢失. 1.刷盘 ...
- ChatGPT的探索与实践-业务应用篇
本篇文章主要介绍在实际的开发过程当中,如何使用GPT帮助开发,优化流程,恰逢今年京东20周年庆,文末会介绍如何与618大促实际的业务相结合,来提升应用价值.全是干货,且本文所有代码和脚本都是利用GPT ...
- MyBatis理论
MyBatis简介 MyBatis是什么? MyBatis是一款优秀的持久层框架,一个ORM(对象关系映射)框架,它支持定制化SQL.存储过程以及高级映射.MyBaits避免了几乎所有JDBC代码和手 ...
- 理解TCP3次握手
以AB通话为例 A的视角 A给B打电话,进入SYN_SENT B接起电话,A确认后,进入ESTABLISHED B的视角 看到A打过来的电话,接起电话,进入SYN_RCVD 确认对方后,进入ESTAB ...