Skip to content

Installation on Windows

peterdietz edited this page Jan 25, 2013 · 5 revisions

Installing SAFBuilder Instructions for Windows

Prerequisite:

Install Java JDK

You should be able to download an installer for the JDK from: http://www.oracle.com/technetwork/java/javase/downloads

Its probably best to get the latest version of Java. This seems to work fine with Java 7.

Obtain the source code:

Download the .zip archive of the SAFBuilder source code

https://github.com/peterdietz/SAFBuilder/zipball/master

Extract downloaded archive

Open the downloaded .zip you downloaded from Github, and specify the extraction location to something easy to type such as: C:\SAFBuilder

Since the .zip is autogenerated by GitHub, it includes a uniquely named directory that is unneeded and only lengthens the path to the code. Once you extract all files to C:\SAFBuilder, open "peterdietz-SAFBuilder-xxxxxx" and move all the contents of that folder to C:\SAFBuilder.

Compile the source code through Command Prompt

Open "Command Prompt"

WindowsKey + R, type in "cmd", hit enter.

Compile the Source Code with Script

From the Windows Command Prompt, change directory to where SAFBuilder is located.

cd path/to/SAFBuilder
recompile.bat

Test it out on the sample data with script

The .bat file should allow you to run the tool. The first argument is the path to the batch directory. The second argument is the filename of the CSV.

safbuilder.bat C:\SAFBuilder\src\edu\osu\kb\sample_data AAA_batch-metadata.csv

Old Manual Way of recompiling and running SAFBuilder

Compile the Source Code - (OLD Manual Way)

You need to include the external jars in your classpath: commons-io, xmlwriter, commons-vfs. Then the compile command is:

"C:\Program Files\Java\jdk1.6.0_25\bin\javac" -cp ^
    C:\SAFBuilder\javacsv-2.0.jar;C:\SAFBuilder\commons-io-1.4.jar;C:\SAFBuilder\xmlwriter-2.2.jar;C:\SAFBuilder\commons-vfs-1.0.jar;C:\SAFBuilder\commons-logging-1.1.1.jar ^
    C:\SAFBuilder\src\edu\osu\kb\batch\*.java -d C:\SAFBuilder\classes

Test it out on the sample data - (OLD Manual Way)

java -cp C:\SAFBuilder\classes;C:\SAFBuilder\javacsv-2.0.jar;C:\SAFBuilder\commons-io-1.4.jar;C:\SAFBuilder\xmlwriter-2.2.jar;C:\SAFBuilder\commons-vfs-1.0.jar;C:\SAFBuilder\commons-logging-1.1.1.jar ^
    edu.osu.kb.batch.BatchProcess C:\SAFBuilder\src\edu\osu\kb\sample_data AAA_batch-metadata.csv

You don't need the carets "^" in your command, but they are in this guide to make it slightly easier to read. The whole command to enter should be on one line for each step.

Clone this wiki locally