####################################################################

#                                                                  #

#            d8888 888      .d8888b.   .d8888b.        d8888       #

#           d88888 888     d88P  Y88b d88P  Y88b      d8P888       #

#          d88P888 888     888    888 Y88b.          d8P 888       #

#         d88P 888 888     888         "Y888b.      d8P  888       #

#        d88P  888 888     888  88888     "Y88b.   d88   888       #

#       d88P   888 888     888    888       "888   8888888888      #

#      d8888888888 888     Y88b  d88P Y88b  d88P         888       #

#     d88P     888 88888888 "Y8888P88  "Y8888P"          888       #

#                                                                  #

####################################################################

#                                                                  #

# Java Programming Environment Setup                               #

# for Mac OS X - v4.2                                              #

# Written by Hayk Martirosyan and Kevin Wayne                      #

# Princeton University                                             #

#                                                                  #

####################################################################


Initializing functions and beginning installation...


#### Step 1 - Java #################################################


% javac -version

javac 1.8.0_144


% java -version

java version "1.8.0_144"

Java(TM) SE Runtime Environment (build 1.8.0_144-b01)

Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)


Java 8 appears to be properly installed.


Downloading java execution script from

https://algs4.cs.princeton.edu/mac/java-algs4

to

/usr/local/bin/java-algs4


Granting executable permission to

/usr/local/bin/java-algs4


Downloading javac execution script from

https://algs4.cs.princeton.edu/mac/javac-algs4

to

/usr/local/bin/javac-algs4


Granting executable permission to

/usr/local/bin/javac-algs4


Downloading java-cos226 execution script from

https://algs4.cs.princeton.edu/mac/java-cos226

to

/usr/local/bin/java-cos226


Granting executable permission to

/usr/local/bin/java-cos226


Downloading javac-cos226 execution script from

https://algs4.cs.princeton.edu/mac/javac-cos226

to

/usr/local/bin/javac-cos226


Granting executable permission to

/usr/local/bin/javac-cos226


Downloading java-coursera execution script from

https://algs4.cs.princeton.edu/mac/java-coursera

to

/usr/local/bin/java-coursera


Granting executable permission to

/usr/local/bin/java-coursera


Downloading javac-coursera execution script from

https://algs4.cs.princeton.edu/mac/javac-coursera

to

/usr/local/bin/javac-coursera


Granting executable permission to

/usr/local/bin/javac-coursera


#### Step 2 - Textbook Libraries ##################################


Downloading algs4.jar from

https://algs4.cs.princeton.edu/code/algs4.jar

to

/usr/local/algs4/algs4.jar


#### Step 3 - Findbugs ############################################


Downloading findbugs from

https://algs4.cs.princeton.edu/mac/findbugs.zip

to

/usr/local/algs4/findbugs.zip


Extracting zip archive in place at

/usr/local/algs4/findbugs.zip

and deleting .zip file.


Downloading findbugs.xml configuration file from

https://algs4.cs.princeton.edu/mac/findbugs.xml

to

/usr/local/algs4/findbugs.xml


Downloading findbugs-algs4 execution script from

https://algs4.cs.princeton.edu/mac/findbugs-algs4

to

/usr/local/bin/findbugs-algs4


Granting executable permission to

/usr/local/bin/findbugs-algs4


Downloading findbugs-cos226 execution script from

https://algs4.cs.princeton.edu/mac/findbugs-cos226

to

/usr/local/bin/findbugs-cos226


Granting executable permission to

/usr/local/bin/findbugs-cos226


Downloading findbugs-coursera execution script from

https://algs4.cs.princeton.edu/mac/findbugs-coursera

to

/usr/local/bin/findbugs-coursera


Granting executable permission to

/usr/local/bin/findbugs-coursera


#### Step 4 - PMD ############################################


Downloading pmd from

https://algs4.cs.princeton.edu/mac/pmd.zip

to

/usr/local/algs4/pmd.zip


Extracting zip archive in place at

/usr/local/algs4/pmd.zip

and deleting .zip file.


Downloading pmd.xml configuration file from

https://algs4.cs.princeton.edu/mac/pmd.xml

to

/usr/local/algs4/pmd.xml


Downloading pmd-algs4 execution script from

https://algs4.cs.princeton.edu/mac/pmd-algs4

to

/usr/local/bin/pmd-algs4


Granting executable permission to

/usr/local/bin/pmd-algs4


Downloading pmd-cos226 execution script from

https://algs4.cs.princeton.edu/mac/pmd-cos226

to

/usr/local/bin/pmd-cos226


Granting executable permission to

/usr/local/bin/pmd-cos226


Downloading pmd-coursera execution script from

https://algs4.cs.princeton.edu/mac/pmd-coursera

to

/usr/local/bin/pmd-coursera


Granting executable permission to

/usr/local/bin/pmd-coursera


#### Step 5 - Checkstyle ##########################################


Downloading checkstyle from

https://algs4.cs.princeton.edu/mac/checkstyle.zip

to

/usr/local/algs4/checkstyle.zip


Extracting zip archive in place at

/usr/local/algs4/checkstyle.zip

and deleting .zip file.


Downloading checkstyle-algs4.xml configuration file from

https://algs4.cs.princeton.edu/mac/checkstyle-algs4.xml

to

/usr/local/algs4/checkstyle-algs4.xml


Downloading checkstyle-cos226.xml configuration file from

https://algs4.cs.princeton.edu/mac/checkstyle-cos226.xml

to

/usr/local/algs4/checkstyle-cos226.xml


Downloading checkstyle-coursera.xml configuration file from

https://algs4.cs.princeton.edu/mac/checkstyle-coursera.xml

to

/usr/local/algs4/checkstyle-coursera.xml


Downloading checkstyle-suppressions.xml file from

https://algs4.cs.princeton.edu/mac/checkstyle-suppressions.xml

to

/usr/local/algs4/checkstyle-suppressions.xml


Downloading checkstyle-algs4 execution script from

https://algs4.cs.princeton.edu/mac/checkstyle-algs4

to

/usr/local/bin/checkstyle-algs4


Granting executable permission to

/usr/local/bin/checkstyle-algs4


Downloading checkstyle-cos226 execution script from

https://algs4.cs.princeton.edu/mac/checkstyle-cos226

to

/usr/local/bin/checkstyle-cos226


Granting executable permission to

/usr/local/bin/checkstyle-cos226


Downloading checkstyle-coursera execution script from

https://algs4.cs.princeton.edu/mac/checkstyle-coursera

to

/usr/local/bin/checkstyle-coursera


Granting executable permission to

/usr/local/bin/checkstyle-coursera


#### Step 6 - DrJava ##############################################


Deleting old version of DrJava at

/Applications/DrJava.app


Downloading DrJava from

https://algs4.cs.princeton.edu/mac/DrJava.zip

to

/Applications/DrJava.zip


Extracting zip archive in place at

/Applications/DrJava.zip

to create

/Applications/DrJava.app


Downloading DrJava configuration file from

https://algs4.cs.princeton.edu/mac/.drjava

to

/Users/wayne/.drjava


Creating a shortcut to DrJava on the desktop...


#### Step 7 - Terminal #############################################


Creating a shortcut to Terminal on the desktop...


#### Step 8 - Test it out! #########################################


Downloading the test Java program...


Installation complete! Compiling test program...

Test program compiled. Running...


If you saw the bullseye and textbook graphic, the installation

was successful and you are ready to start programming in Java.

Continue with the introductory tutorial on the booksite.


NOTE: If there were any error messages during this setup, check the

troubleshooting section on the website or ask for help.


A log file of this installation is saved at

/usr/local/algs4/log.txt


You should now close this window.