• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

gauravojha/tij4-maven: Thinking in Java 4th Edition Souce Code - Maven project

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

gauravojha/tij4-maven

开源软件地址(OpenSource Url):

https://github.com/gauravojha/tij4-maven

开源编程语言(OpenSource Language):

Java 99.6%

开源软件介绍(OpenSource Introduction):

Thinking In Java 4 Source Code.

Updated to JDK8, and shifted to Maven.

Note: For the 'annotations' package

Bruce's code uses the legacy apt tool, which has been deprecated in Java 7, and removed in Java 8.

In order to remove the compilation errors you would see in Eclipse, please add the "External Jar" - tools.jar provided in the "lib" folder to your Eclipse project. (Taken from OpenJDK 7u51)

Installation

Simply download the source code (clone the project) and import this project as a new Maven project into your IDE.

Please note that as mentioned on the author's website, you need to add the following 4 libraries to successfully build the whole code:

  1. XOM
  2. Javaassist
  3. swt.jar
  4. javaws.jar

XOM and Javaassist have been placed as a maven dependency in pom.xml.

As for swt.jar and javaws.jar, javaws.jar can found in your JRE installation at inside the 'lib' folder. Example: C:\Program Files\Java\jre1.8.0_77\lib

swt.jar can be found at: http://download.eclipse.org/eclipse/downloads/ Just choose the latest version, scroll down to "SWT Binary and Source", and download the corresponding binary for your platform.

After you download these two libraries, place them inside the "jre/lib/ext" of the Java Runtime that is set up when you install the JDK.

(As explained by the author Bruce Eckel on the source code page)

Also, do not forget to add the external 'tools.jar' to your Eclipse project (Read the note above for annotations package)

Tested on Eclipse.

Motivation

The book 'Thinking in Java' is an excellent resource for learning Java. This github project simply aims to move the Source Code for the book to a Maven project, thereby making it very easy for learners to import it into their IDEs and begin exploring. Personally, I wasn't able to get the Ant build to work, because the build xmls inside the packages had all restrictions that they would only get built if Java SE 5 was present. I had SE7 to start, and like me, I believe most of the learners would have updated their JDK to updated versions. So instead of modifying the build xmls, I thought it would be better to simply migrate the code to a Maven project.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap