changeset 355:68df11a65b27

temporary java stuff to load native library.
author Robert McIntyre <rlm@mit.edu>
date Wed, 06 Mar 2013 17:13:27 +0000
parents 8d08646eaf99
children 446300cb5ae7
files .hgignore java/build.xml java/src/com/aurellem/opencv/OpenCV.java
diffstat 3 files changed, 52 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/.hgignore	Tue Mar 05 19:18:03 2013 +0000
     1.2 +++ b/.hgignore	Wed Mar 06 17:13:27 2013 +0000
     1.3 @@ -1,6 +1,6 @@
     1.4  syntax: glob
     1.5  video*
     1.6 -src*
     1.7 +
     1.8  html*
     1.9  tmp*
    1.10  capture-video.html
    1.11 @@ -13,7 +13,9 @@
    1.12  liblwjgl.so
    1.13  libopenal.so
    1.14  libbulletjme.so
    1.15 -
    1.16 +java/build/*
    1.17 +java/dist/*
    1.18  
    1.19  syntax: regexp
    1.20 -^.*blend\d$
    1.21 \ No newline at end of file
    1.22 +^.*blend\d$
    1.23 +^src.*
    1.24 \ No newline at end of file
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/java/build.xml	Wed Mar 06 17:13:27 2013 +0000
     2.3 @@ -0,0 +1,32 @@
     2.4 +<project name="cortex-opencv" default="dist" basedir="."> 
     2.5 +
     2.6 +  <property name="build" value="build"/>
     2.7 +  <property name="src" value="src"/>
     2.8 +  <property name="dist" value="dist"/>
     2.9 +
    2.10 +  <target name="prepare">
    2.11 +    <mkdir dir="${build}"/>
    2.12 +    <mkdir dir="${dist}"/> 
    2.13 +  </target>
    2.14 +
    2.15 +  <target name="compile" depends="prepare" >
    2.16 +    <javac srcdir="${src}" destdir="${build}"
    2.17 +	   includeantruntime="false"/>
    2.18 +  </target>
    2.19 +
    2.20 +  <target name="dist" depends="compile">
    2.21 +    <jar jarfile="${dist}/cortex-opencv.jar">
    2.22 +      <fileset dir="${build}"/>
    2.23 +      <fileset dir="${src}"/>
    2.24 +    </jar>
    2.25 +  </target>
    2.26 +
    2.27 +  <target name="all" depends="dist"/>
    2.28 +
    2.29 +  <target name="clean" > 
    2.30 +    <delete dir="${build}"/> 
    2.31 +    <delete dir="${dist}"/> 
    2.32 +  </target> 
    2.33 +
    2.34 +</project>
    2.35 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/java/src/com/aurellem/opencv/OpenCV.java	Wed Mar 06 17:13:27 2013 +0000
     3.3 @@ -0,0 +1,15 @@
     3.4 +package com.aurellem.opencv;
     3.5 +
     3.6 +public class OpenCV {
     3.7 +
     3.8 +    public OpenCV(){}
     3.9 +    
    3.10 +    public static void loadVBA(){
    3.11 +	System.loadLibrary("opencv_java249");
    3.12 +    }
    3.13 +
    3.14 +    public static void absoluteLoadVBA(){
    3.15 +	System.load("/usr/share/OpenCV/java/libopencv_java249.so");
    3.16 +    }
    3.17 +
    3.18 +}