Skip to content

Compiling libimc.jar

Jose Pinto edited this page Dec 9, 2016 · 7 revisions

Requirements

  • Java Development Kit (JDK) 1.7+
  • Ant 1.8+
  • Git

Steps

  • Clone the IMCJava git repository to your machine
git clone https://github.com/LSTS/imcjava.git
  • Clone the IMC protocol git repository to your machine
git clone https://github.com/LSTS/imc.git
  • Inside the newly created imcjava/ repository, run ant with default target:
cd imcjava; ant
  • You will be prompted to enter the path to the IMC protocol git repository, hit ENTER to use the default "../imc".

Advanced

  • You can alternatively pass the path to the IMC definition in the command line when calling ant (and you won't then be prompted to do so during compilation):
cd imcjava; ant -Dimc.dir=../imc
  • You may access the original IMC protocol definition used to generate the libimc.jar by running that file:
java -jar dist/libimc.jar | less

Updating Neptus IMC definitions

Neptus depends on IMCJava for IMC communications. If you wish to use the newly generated definitions in Neptus, you must also update libimc.jar in Neptus project:

cp dist/libimc.jar $NEPTUS_HOME/lib/libimc.jar