title: How to run Java programs from Algorithms textbook by Robert Sedgewick?
body: <p>I apologize for a rookie question.  I am trying to run the Java programs in Eclipse given in the Algorithms, 4th edition book by Robert Sedgewick and Kevin Wayne: <a href="https://algs4.cs.princeton.edu/home/" rel="nofollow noreferrer">https://algs4.cs.princeton.edu/home/</a></p>
  
  <p>I am having trouble with input arguments to the programs.</p>
  
  <p>For example for the following program:</p>
  
  <pre><code>import java.util.Arrays;
  
  public class BinarySearch
  {
      public static int rank(int key, int[] a)
      { // Array must be sorted.
       int lo = 0;
          int hi = a.length - 1;
          while (lo &lt;= hi)
          { // Key is in a[lo..hi] or not present.
  
            int mid = lo + (hi - lo) / 2;
              if (key &lt; a[mid]) hi = mid - 1;
              else if (key &gt; a[mid]) lo = mid + 1;
              else return mid;
          }
          return -1;
      }
  
  
  
      public static void main(String[] args)
      {
  
          int[] whitelist = In.readInts(args[0]);
          Arrays.sort(whitelist);
          while (!StdIn.isEmpty())
          { // Read key, print if not in whitelist.        
           int key = StdIn.readInt();
              if (rank(key, whitelist) &lt; 0)
              StdOut.println(key);
          }    
      }
  }
  </code></pre>
  
  <p>The input arguments are:</p>
  
  <pre><code>% java BinarySearch tinyW.txt &lt; tinyT.txt
  </code></pre>
  
  <p>I don't know where to pass input arguments in Eclipse. Any help will be appreciated.</p>