Brett's manual install

From RepRap
Jump to: navigation, search

Platform Ubunutu 11.04 Open Java SDK 6.0

Directory structure

~/reprap/jar
~/reprap/lib
~/reprap/lib-x86_64
~/reprap/reprap

Directory contents of: ~/reprap/jar

reprap.jar


Directory contents of: ~/reprap/lib

j3dcore.jar
j3d-org-java3d-all.jar
j3dutils.jar
reprap.ico
reprap-icon.png
reprap.properties.dist
reprap-wv.stl
rr-logo-green-url.png
RXTXcomm.jar
swing-layout-1.0.4.jar
vecmath.jar

Directory contents of: ~/reprap/lib-x86_64

This is the directory for the shared libraries. Unlike the java jar's these are specific to the CPU you are running.

libgluegen-rt.so
libjogl_awt.so
libjogl_cg.so
libjogl.so

Contents of reprap (this is a script)

#!/bin/bash
# reprap-host -- runs RepRap Java host with an appropriate classpath
#
# Usage: ./reprap
#
# or
# 
# ./reprap <installdir>
#
# where <installdir> is the directory path where reprap host has been installed.
#

# check we are running the correct version of java
java -version 2>&1 | awk 'NR==1 {if (index($3, "1.6") >0) exit 0 ;exit 1}'

if [ "$?" -ne "0" ]; then
  echo "Sorry you need to be running Java 6 for reprap to run"
  exit 1
fi

# Amount of RAM to allow Java VM to use
# You may need to increase this to load in really large jobs.
REPRAP_RAM_SIZE=1024M
REPRAP_DIR=`dirname $0`       # reprap.jar, jni libs and stl file

cd $REPRAP_DIR

MACHINE=`uname -m`

# put the directory with the native RXTX and j3d libs in the library path
LD_LIBRARY_PATH=/usr/lib/jni:`pwd`/lib-${MACHINE}:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH

CLASSPATH=./jar/reprap.jar
# we are using java 6 so a wild card will pick all of the jars in the directory
CLASSPATH=$CLASSPATH:./lib/*
# the .stl file must be in a directory which is on the the classpath but its not a jar so the wild card won't work
CLASSPATH=$CLASSPATH:./lib

# invoke the code
java -cp $CLASSPATH -Xmx$REPRAP_RAM_SIZE org.reprap.Main