Brett's manual install

From RepRap
Revision as of 05:53, 7 July 2011 by Bsutton (talk | contribs)
Jump to: navigation, search

Platform Ubunutu 11.04 Open Java SDK 6.0

Directory structure

/jar
/lib
/lib-x86_64
reprap

Directory contents

/jar
reprap.jar

/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

/lib-x86_64 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.
#

# 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/jvm/java-6-openjdk/jre/lib/i386:`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