Update polyAextract.java

This is the latest code as of 6/20/2103. This one runs in the terminal.