CPS160 directions

directions for perl programming setup in cps160

In this class we will be using a common IDE (Integrated Development Environment) called Eclipse. IDEs are nice because they often make programming easier with features such as syntax highlighting and debugging capabilities. This is especially useful for Perl, which can sometimes be syntactically fickle.

Eclipse was developed in Java, so in addition to Eclipse, you will also need to download the JRE (Java Runtime Environment) from Sun. This allows Eclipse to be run on almost any OS, from Windows to Mac and UNIX. Note, the Mac OS comes preloaded with the JRE, so you will most likely not need to download anything if you are using a Mac. Also, if you have programmed in Java before, you almost certainly have the JRE installed. The JRE can be found here (7.6 MB). You can download the Java SDK (Software Developers Kit) instead. If you plan on coding anything in Java later, or if you plan on taking another Computer Science class at Duke, I would recommend you download the SDK instead. In addition to the JRE, it includes libraries which may be necessary for any Java coding projects you take on. These steps are listed below.

1.) Download the JRE or Java SDK 1.4.2_06 for your operating system (if it is not already installed). Click the "Download J2SE SDK" link, and you will have to accept a license agreement. Then, select the appropriate Java SDK for your OS.

Once you have downloaded and installed either the JRE or the Java SDK, you need to actually download Eclipse. The Eclipse file you download is not a self-installing archive. Instead, you will need to extract the zip file's contents to a folder on your hard-drive (you can just use C:\ or C:\Program Files). These steps are listed below.

2.) Download Eclipse 3.0.1 for your operating system:

3.) For convenience, you will most likely want a short-cut to Eclipse on your desktop. In windows, this is fairly simple to do. Right click on the desktop and select new shortcut. Then type C:\eclipse\eclipse.exe or C:\Program Files\eclipse\eclipse.exe depending upon where you extracted the files to. For Macs, this process is slightly different, but I can help you on Monday if you are having problems.

Now that you have Eclipse installed, you will need to install the libraries that are necessary to run Perl. Once again, these come preinstalled in UNIX and thus in any Mac OS. One of the most popular libraries for this is ActivePerl. The current version is 5.8.6. These steps are listed below.

4.) Download and install ActivePerl:

5.) Next, you need to install the Ambient plug-in. The Ambient plug-in provides a simple interface for you to send receive and submit code. Run Eclipse and use its update manager to download and install the Ambient plugin by following the directions online.

6.) You also need to install and set up the EPIC plug-in. This will allow you to create and run Perl programs from within Eclipse. These steps are similar to those found at the link above. Follow the instructions below:

7.) Finally, you need to set up Eclipse so that you can run your Perl programs with a simple click. This will allow you to bring up the shell or command prompt in the console.

Next, try making your first perl program in Eclipse.