HOWTO build/run RFIDSim in Ubuntu 9.04 ====================================== Written by Rasmus M. Jacobsen, raller@es.aau.dk August 28, 2009 The following has shown to work at a fully updated Ubuntu 9.04 (both i386 and amd64) August 28, 2009. The main problem to make RFIDSim run is version conflicts for dependencies. This guide should work on a newly installed Ubuntu environment, i.e. all prerequisites and dependencies are listed in this guide. The steps are as follows: 1. Install jdk, revision control applications and checkout 2. Dependencies 2a. Easy build with static LTKJava dependency 2b. Not that easy build with home build LTKJava dependency 2b.a. Download zipped dependency file 2b.b. Download dependencies separate 2b.1. Build LTKJava 3. Build and run RFIDSim Letters are "or" sections, i.e. the easiest install is 1->2->2a->3 and the most difficult is 1->2->2b->2b.b->2b.1->3. 1. INSTALL JDK, REVISION CONTROL APPLICATIONS AND CHECKOUT ---------------------------------------------------------- Install apps: sudo apt-get install cvs subversion sun-java6-jdk ant Checkout RFIDSim: svn co http://svn.assembla.com/svn/RFIDSim/trunk rfidsim (current revision: 59) 2. DEPENDENCIES --------------- RFIDSim has some dependencies which are found in this section. 2A. EASY BUILD WITH STATIC LTKJava DEPENDENCY --------------------------------------------- First, create ~/rfidsim/rfidsim/lib: mkdir ~/rfidsim/rfidsim/lib Download all dependencies for rfidsim and extract in ~/rfidsim/rfidsim/lib. The file to download is: http://kom.aau.dk/~raller/rfidsim-build-dep-with-ltk_280809.tar.gz 2B. NOT THAT EASY BUILD WITH HOME BUILD LTKJava DEPENDENCY ---------------------------------------------------------- Checkout LTKJava: cvs -d:pserver:anonymous@llrp-toolkit.cvs.sourceforge.net:/cvsroot/llrp-toolkit login (no password) cvs -z3 -d:pserver:anonymous@llrp-toolkit.cvs.sourceforge.net:/cvsroot/llrp-toolkit co -P LTK Create the lib directory for LTKJava: mkdir LTK/LTKJava/lib cd LTK/LTKJava/lib 2B.A. DOWNLOAD ZIPPED DEPENDENCY FILE ------------------------------------- Download http://kom.aau.dk/~raller/ltkjava-build-dep_280809.tar.gz and put files in ~/LTK/LTKJava/lib. 2B.B. DOWNLOAD DEPENDENCIES SEPARATE ------------------------------------ Now the tough part: Dependencies. Here is a list of files to download. In each of these files we want specific jar files. These jar files can be downloaded in a single file. The following table works as follows: First column is the file to download, the second is the file to extract from this file. The extracted files should go into ~/LTK/LTKJava/lib. As of today, these are the newest files. If newer files exist, try those. http://www.jdom.org/dist/binary/jdom-1.1.1.tar.gz /jdom/build/jdom.jar http://sourceforge.net/projects/jargs/files/jargs/1.0/jargs-1.0.zip/download /jargs-1.0/lib/jargs.jar http://mina.apache.org/dyn/closer.cgi/mina/1.1.7/mina-1.1.7.tar.gz /mina-1.1.7/mina-core-1.1.7.jar http://www.apache.org/dist/xerces/j/Xerces-J-bin.2.9.1.tar.gz /xerces-2_9_1/xersesImpl.jar http://www.apache.org/dist/velocity/engine/1.6.2/velocity-1.6.2.tar.gz /velocity-1.6.2/velocity-1.6.2.jar http://www.apache.org/dist/commons/logging/binaries/commons-logging-1.1.1-bin.tar.gz /commons-logging-1.1.1/commons-logging-1.1.1.jar http://www.apache.org/dist/commons/collections/binaries/commons-collections-3.2.1-bin.tar.gz /commons-collections-3.2.1/commons-collections-3.2.1.jar http://www.apache.org/dist/commons/configuration/binaries/commons-configuration-1.6.tar.gz /commons-configuration-1.6/commons-configuration-1.6.jar http://www.apache.org/dist/commons/lang/binaries/commons-lang-2.4-bin.tar.gz /commons-lang-2.4/commons-lang-2.4.jar http://sourceforge.net/projects/jalopy/files/plugin%20eclipse/0.2-1.5rc3/jalopy-eclipse-0.2-1.5rc3.zip/download /de.hunsicker.jalopy.plugin.eclipse_0.2-1.5rc3/jalopy.jar http://www.apache.org/dyn/closer.cgi/logging/log4j/1.2.15/apache-log4j-1.2.15.tar.gz /apache-log4j-1.2.15/log4j-1.2.15.jar Last dependency is a little tricky, download https://jaxb.dev.java.net/2.2-ea/JAXB2_20090410.jar into the ~/LTK/LTKJava/lib, run: java -jar JAXB2_20090410.jar cp jaxb-ri-20090410/lib/jaxb-{xjc,impl,api}.jar . 2B.1. BUILD LTKJava ------------------- Now, in ~/LTK/LTKJava, run: ant jar The reply should be "BUILD SUCCESSFUL". Now, copy the build jar file to the RFIDSim checkout: mkdir ~/rfidsim/rfidsim/lib cp target/ltkjava-1.0.0.7-SNAPSHOT.jar ~/rfidsim/rfidsim/lib RFIDSim needs some of the same dependencies, we copy them from the downloaded dependencies: cp lib/log4j-1.2.15.jar ~/rfidsim/rfidsim/lib cp lib/jargs.jar ~/rfidsim/rfidsim/lib cp lib/jdom.jar ~/rfidsim/rfidsim/lib Additionally the following dependencies; first cd ~/rfidsim/rfidsim/lib then, as before. The files should go into ~/rfidsim/rfidsim/lib: http://apache.osuosl.org/jakarta/bcel/binaries/bcel-5.2.tar.gz /bcel-5.2/bcel-5.2.jar http://archive.apache.org/dist/jakarta/bcel/old/v5.1/bcel-5.1.tar.gz /bcel-5.1/bcel-5.1.jar (bcel 5.2 does not work!) http://sourceforge.net/projects/junit/files/junit/4.7/junit-4.7.jar/download http://www.beanshell.org/bsh-2.0b4.jar Again, a more tricky dependency. Download: http://sourceforge.net/projects/jython/files/jython/jython_installer-2.2.1.jar (jython 2.5.0 does not work!) Run it using: java -jar jython_installer-2.2.1.jar In the setup, choose: - Installation type: Standalone - Target directory: ~/rfidsim/rfidsim/lib/jython2.2.1 Now, copy to lib directory: jython2.2.1/jython.jar . 3. BUILD AND RUN RFIDSim ------------------------ Go to ~/rfidsim/rfidsim and build: cd ~/rfidsim/rfidsim ant compile To run the sample simulation: ant run Thats it - done!