LibusbJava

libusb for Java

User Tools

Site Tools


building:start

This is an old revision of the document!


Building

The dll (from C sources) and jar-file (from java sources) must be built separately. Checkout from https://gitlab.ost.ch/tech/inf/public/libusb-java.

Java Part

  • Create jar file from LibusbJava_Java
  • If changes were made in Libusb.java → remake header file for LibusbJava_C with
    $javah ch.ntb.inf.libusb.Libusb

    Copy new header file to LibusbJava_C.

C++ Code

Windows

  • install MinGW or similar
  • use cmake to build the project

Linux

  • Änderungen machen
  • Bash zu LibusbJava_C Ordner
  • g++ -shared -o libLibusbJava-"VERSION".so -fPIC LibusbJava.cpp -I"/usr/lib/jvm/java-"JAVA-VERSION"-openjdk-"ARCHITECTURE"/include" -I"/usr/lib/jvm/java-"JAVA-VERSION"-openjdk-"ARCHITECTURE"/include/linux" -I"./" -std)c++0x
  • Erstellte .so nach /usr/lib kopieren (oder symlink)
building/start.1655477066.txt.gz · Last modified: 2022/06/17 16:44 by ursgraf