JGRASP



The jGrasp environment is installed and properly configured for your usein the Computer Science department labs. Even so, many students opt to setupa similar environment on their home computers. This guide is meant to assistyou in so doing.

JGRASP is a lightweight development environment created specifically to provide automatic generation of software visualizations to improve the comprehensibility of software. JGRASP is implemented in Java, and runs on all platforms with a Java Virtual Machine (Java version 1.5 or higher). JGRASP is a lightweight IDE software that helps people in coding and software development. JGRASP is freeware, i.e., it is completely free to download and use, but its source code is not available for the user to see. JGRASP was developed by 2 people at the Auburn Institute called James Cross and Larry Barowski. JGRASP was very well received.

JGRASP is a lightweight development environment, created specifically to provide automatic generation of software visualizations to improve the comprehensibility of software. JGRASP is implemented in Java, and runs on all platforms with a Java Virtual Machine (Java version 1.5 or higher). JGRASP produces Control Structure Diagrams (CSDs) for Java, C, C, Objective-C, Python, Ada, and VHDL. In Windows, jGRASP should also be listed in the Start Menu. Once you have successfully installed the JDK and jGRASP, you can delete jgrasp18609.exe (or jgrasp18609.pkg.tar.gz) and jdk-6u7-windows-i586-p.exe from your computer. Starting jGRASP the First Time Double-click on the jGRASP icon on your Desktop to start jGRASP. JGrasp does not show you errors until compile time. This is a big one for me. Many beginners do not think to code slowly and compile often. Usually they will write write write until they have many lines of code.

jGrasp is actually an integrated development environment that wraps thegnu compiler collection (gcc). jGrasp is not itself a compiler. As such,the first step is to install gcc. These instructions are intended forWindows users.

If you are using Linux, then you should already have gcc installed andcan just install jGrasp. If you are using MacOS X, then you can installgcc by installing the XCode package from your installation CD. Once done,download jGrasp from jGrasp download page and install it.Note that jGrasp uses the Java runtime environment (JRE). If you alreadyhave the JRE installed (e.g., if you can view Java applets in your browser),then you can click the first button, jGRASP.exe. If not, click thesecond button, jGRASP JRE.exe. If in doubt, click the second button(though it is a significantly larger download).

Windows users should continue to the next step. There are some otheroptions for installing gcc, but this is one of the simpler options.

MinGW

Download

First, download the following package (zip file), saving it in some easilyaccessible location. These package contains the MinGW gcc compilerinstallation including additional utilities and necessary libraries.

gcc.zip

Extract

Next you will need to extract the contents of the package. You shouldbe able to open this under Windows XP. If there are any problems, you candownload one of a number of utilities (such as WinZip) that can open thepackage. You may extract the contents to any directory (folder) that you'dlike. The package contains a directory named gcc that, in turn,contains a number of other directories. I chose to place this in the'C:Program Files' directory. The screenshot below shows the contents of'C:Program Filesgcc' after extracting the files from the package. Onceyou have completed this step, you should have the same set of subdirectoriesshown below.

Setting the Path

To simplify the use of gcc and to allow jGrasp to find this compiler, itis advisable that you modify the Path environment variable forWindows. To do this, right-click on the My Computer icon and selectProperties or, from the Start menu, open the Control Paneland select System. Once opened, click the Advanced tab, anddepress the Environment Variables button (see the highlighted imagebelow). Scroll down to the Path variable and click Edit. Atthe end of the text field add ;C:Program Filesgccbin (if youextracted the files to a different location, then you will use that locationinstead). Caution: Do not delete the path that is currentlyset. Just add to the end of it.

C++ Compiler For Jgrasp

There are two things to note here. First, each portion of the path variableis separated by a semicolon (;). This is required, so if you run into problems,carefully check your addition to the path. Second, you want to include thebin (meaning binary) directory (folder) as part of the path (note theend of the path in the image). This directory contains the executables (theapplications or programs in Windows terminology) for the compiler and itsassociated utilities. After you modify the path, be sure to click theOk button for each dialog window.

Quick gcc Sanity Check

As a quick sanity check, open a command shell by selecting Runfrom the Start menu and executing cmd.

JGRASP

In the command window, type gcc. If your path is set correctly, youwill see a response from the compiler such as that shown below.

Jgrasp Debugger

With gcc installed, the next step is quite straightforward. DownloadjGrasp (select the jGRASP JRE exe button for the Windows self-extracting exe with JRE 1.5) and install it (follow theinstallation prompts from the executable). Next, try compiling and runningthe example illustrated in the following image. After typing the sourcecode, you can compile and link the program by clicking on the icon thathas two plus symbols (highlighted below). If it builds correctly(which it should as long as you have correctly installed the compiler), thenyou can execute the program by clicking the running stick figure icon.

At this point, you should be set. Try the examples from the first lab orsome examples from the textbook.

Jgrasp Linux

Make Utility

Jgrasp

Make is a utility to aid in the compilation of large projects. Its useis also important in the context of jGrasp when working with multiple files.The following directions should help you to install make on your personalmachine.

Jgrasp Download Windows 10

  1. Download the make installer: mingw32-make-3.80.0-3.exe
  2. Run the installer and install make into the same directory in which you installed gcc.
  3. Find mingw32-make.exe and change its name to make.exe. This will allow jGrasp to find make.