The home page has the relevant environment configuration
http://algs4.cs.princeton.edu/windows/
Download the Algs4.exe and install it, but it will take a lot of useless steps.
Since you are using eclipse, it is good to configure it directly under Eclipse.
The work is very simple, is to add Stdlib.jar and Algs4.jar two packs into your project just fine.
Under Project Build path, select Add External Archives and then find Stdlib.jar and Algs4.jar.
In addition, many of the programs in the book are input redirection to get input:
Java BinarySearch TinyW.txt < tinyT.txt
It's not easy to use redirects in Eclipse, so what do you do?
Methods are:
First, directly with the scanner class:
Direct Read input:
New Scanner (system.in);
Use Crtl+z to terminate input
Read in from text:
1 New Scanner (new file ("filename")); 2 while (Stdin.hasnext ()) {3 int key = stdin.nextint (); 4 }
Second, the implementation of the console, the Stdlib.jar added into the classpath.
Algorithm 4th edition of Eclipse Environment building