Configuring Eclipse IDE for Algorithms, Part I (Coursera)

Coursera is offering great algorithmic courses Algorithms, Part I and Part II by Robert Sedgewick. The only problem with them is Dr. Java IDE they recommend. It is free, usable but completely impractical when it comes to debugging.  I’ve configured Eclipse IDE and my productivity increased significantly, especially when it comes to debugging.

Here is how to configure Eclipse on Windows machine for Algorithms, Part I/part II:

  1. Uninstall any instances of Java from your machine
  2. Follow step 0 from http://algs4.cs.princeton.edu/windows/ to install algs4.exe
    • only follow step 0, skip the rest as we will use Eclipse instead of Dr. Java
  3. Download stdlib.jar and algs4.jar to permanent folder
  4. Download Eclipse IDE for Java Developers
    • At the time of this blog post I had Eclipse Luna SR1 4.4.1 on my machine
  5. Follow instructions in eclipse.pdf to configure Eclipse.
    • The instructions are long and little tedious but well worth it
    • Here’s how you create a User Library in Eclipse: go to Window > Preferences > Java > Build Path > User Libraries, create New library and add algs4.jar and stdlib.jar from step 3 (I called it Coursera): 0UserLibraries
    • Whenever you create a new Java project you need to add newly created user library : right click on project, Build Path > Add Libraries 1AddLibrary 2AddLibrary
    • Here’s what your Java project in Eclipse will look like after adding this library:3Project

Eclipse worked well for me and as I mentioned previously increased my productivity which made studying fun again.

Good luck and let me know if you have questions!

3 thoughts on “Configuring Eclipse IDE for Algorithms, Part I (Coursera)

  1. Pingback: Algorithms, Part I on Coursera | Code and Coda

  2. Adam

    On using eclipse – how did you setup redirecting input/output?

    For example BinarySearch, the java command used is “java BinarySearch whitelist.txt < input.txt"
    Yet you can't simply put that into eclipse command line arguments. Sattolo is another example, that one I can't even get it to read any arguments!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *