Copying JAR files from the SAS Versioned Jar Repository to a directory


Sometimes, you might find it necessary to copy SAS JAR files from the SAS Versioned Jar Repository to another directory. For example, you might need to do this if you use those JAR files in custom Java applications that access APIs or that use SAS JDBC drivers.

To copy your JAR files to another directory:

  1. Go to the Downloads section in this article. Download and uncompress the vjrextract.zip file this file to a directory on your machine.
  2. Edit the appropriate script file for your system to reflect your directory names as well as the name of the directory to which the JAR file are to be copied. You can edit the following parameters:
    • JAVA_CMD= parameter: This parameter specifies the location of your Java executable file.
    • VJR_LOC= parameter: This parameter specifies the location of your SAS Versioned Jar Repository.
    • PICKLIST= parameter: This parameter specifies the pick list that contains the JAR files that you want copied.
    • OUTPUT_DIR= parameter: This parameter specifies the directory to which the JAR files should be copied.

3. After you edit these parameters, simply run the script files.

Example of an Extract.bat File in Microsoft Windows Operating Environments

set JAVA_CMD="C:\Program Files\Java\jdk1.5.0_15\bin\java"
set VJR_LOC="C:\Program Files\SAS92\SASVersionedJarRepository\9.2"
set PICKLIST="C:\Program Files\SAS92\SASDriversforJDBC\9.2\picklist"
set OUTPUT_DIR=".\jars"

%JAVA_CMD% -jar VJRExtract.jar %VJR_LOC% %PICKLIST% %OUTPUT_DIR%

Example of an Extract.sh File in UNIX Operating Environments

JAVA_CMD="/usr/local/Java/jdk1.5.0_15/bin/java"
VJR_LOC="/usr/local/SAS92/SASVersionedJarRepository/9.2"
PICKLIST="/usr/local/SAS92/SASDriversforJDBC/9.2/picklist"
OUTPUT_DIR="/usr/local/SAS92/jars"

$JAVA_CMD -jar VJRExtract.jar  $VJR_LOC  $PICKLIST  $OUTPUT_DIR


 Downloads

Download and uncompress the following file to a directory on your machine: vjrextract.zip