# Setting up the Development Environment

This section contains information that helps you set up your computer so that you can start using the Viewer Java SDK. It provides an overview of the software that must be installed before you can use the SDK, as well as which Java components are part of the SDK and where you can find them.

It is assumed that you are familiar with the basics of developing, packaging, and deploying Java 2 Platform, Enterprise Edition (J2EE) web components.

Click the appropriate link to jump to that section:

- Prerequisite software
- Locating the SDK components
- Configuring data sources

## Prerequisite software

Before you can use the viewer, you must have a Java Application Server installed and configured. This can be installed on the computer that you use to develop or deploy your JSP pages, or it can be on another computer accessible through your network. Refer to your application server's documentation for installation and configuration details.

You must also ensure that BEA WebLogic Workshop and Crystal Reports for BEA WebLogic Workshop have been installed. This is required, as the JAR files that make up the viewer and the Java Reporting Component are installed as part of the Crystal Reports for BEA WebLogic Workshop install process. For more information on installing Crystal Reports for BEA WebLogic Workshop, see the Crystal Reports for BEA WebLogic Workshop User's Guide.

### What components must be running?

Because the viewer and the Java Reporting Component are written entirely in Java, only your Java Application Server needs to be running in order to use the Viewer Java SDK to view and export reports. If you wish to use the Viewer Java SDK with other Crystal products such as Crystal Enterprise or a Report Application Server, however, you must ensure that the appropriate components for those products are running in order to access the features they provide.

## Locating the SDK components

The Java classes that are specific to the Viewer Java SDK are packaged into an archive file named `webreporting-core.jar`. These core SDK classes, however, are dependent upon classes from several other JAR files and support files that are installed as part of Crystal Reports for BEA WebLogic Workshop.

On Windows systems, the JAR files can be found in `C:\Program Files\Common Files\Crystal Decisions\2.5\java\lib`. On Unix systems, the JAR files can be found in crystal-root`/java/lib`, where crystal-root is the directory where Crystal Reports for BEA WebLogic Workshop is installed. If you would like to use the Viewer Tag Library, ensure that the `taglib` directory is included with your application as well.

Once you have located the JAR files, you must add them to your web application's `WEB-INF/lib` folder. The CrystalReportEngine-Config.xml file contained in the directory containing the JAR files must also be copied over. It contains configuration details for the Java Reporting Component. For more information on how to configure these settings, see Java Reporting Component configuration.

Support files are also located under the same directory structure outlined above. The `crystalreportviewers10` directory is needed by the viewer for images, style sheets, and general print and export handling. This directory should be copied to your web application's root directory. You can specify the location of this directory by setting the crystal_image_uri context parameter in your web.xml file.

## Configuring data sources

The Java Reporting Component makes use of JNDI to establish connections to data sources. It relies on the JNDI server running on your application server to determine how to connect to the data sources specified in a report. Once the connection information has been retrieved from the JNDI server, the Java Reporting Component uses the information to establish a JDBC connection to the data source. To ensure that the Java Reporting Component can successfully establish a connection when retrieving report data, ensure that the JNDI entries for the required data sources are correctly configured. For more information on how to configure a JNDI data source entry, please consult your application server's and JDBC driver's documentation.

Crystal Decisions http://www.crystaldecisions.com/ Support services http://support.crystaldecisions.com/