简体   繁体   中英

Thinking in java library installation

Hi i've been trying to install the library on Thinking in Java book 4th edition and i hit a very thick brick wall. I've done everything that the guide from the website told me to do and i still can't get the library to work. From what i've read it seems that the problem is from the build.xml files. having no xml knowledge I am clueless about how I have to modify it in order for it to work. In both cmd and eclipse I am getting these error

c:\\TIJ4\\code\\build.xml

Build Failed

c:\\TIJ4\\code\\build.xml:59:J2SE5 required

Can anyone tell me what I should do ?

I am using eclipse if there is a simpler solution by using eclipse rather than ant please help me out. It's been a week now and I still can't make it work.

The important thing to do is to realize that your ant file has a specific java requirement.

Something to try that might fix this very easily : I believe you can remove any references to a specific JDK, and if you have a reasonably up to date JDK, the build will succeed.

The definete fix : Look into the exact (line 59) of your build file, and try to satisfy the java version that line requires. Java is generally backwords compatible -- something designed to run in J2SE5 should run in the latest JDK. Its not terribly difficult to update your JDK (just google for instructions on your OS).

  • The most common mistake I see is that people who have the java run time installed believe they also have the Java SDK as well.

Does this "install the library" means you want to look at the code and run them in your eclipse? If so I can share my experience with you.

  1. First run the Eclipse.py script; this will add package info to the source code
  2. Create a new Java project in Eclipse, and then just copy all the source code folders to the src source folder in eclipse, these folders will then be recognized as Java packages.
  3. You should be able to run the classes with a main function.

You can also configure which java version to use for this project in Eclipse build path. 1.5 or higher will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM