Git Product home page Git Product logo

Comments (10)

meza avatar meza commented on May 20, 2024

[blink1/libraries]$ export LD_LIBRARY_PATH=. && java -jar blink1.jar

even this produces the same

from blink1.

todbot avatar todbot commented on May 20, 2024

Hi Maza,
Take a look at the shell script:
https://github.com/todbot/blink1/blob/master/java/blink1-tool-java.sh
for an example of how to set up the various paths.

Also, if you are on Linux, you will probably need to rebuild libBlink1.so by doing a "make compile" and "make jar" in blink1/java

from blink1.

meza avatar meza commented on May 20, 2024

Hey,

Even the script does the same thing before and after rebuilding the so. :(

On 1 Feb 2013 19:51, "Tod E. Kurt" [email protected] wrote:

Hi Maza,
Take a look at the shell script:
https://github.com/todbot/blink1/blob/master/java/blink1-tool-java.sh
for an example of how to set up the various paths.

Also, if you are on Linux, you will probably need to rebuild libBlink1.so
by doing a "make compile" and "make jar" in blink1/java


Reply to this email directly or view it on GitHubhttps://github.com//issues/40#issuecomment-13010925.

from blink1.

todbot avatar todbot commented on May 20, 2024

The Java wrapper under Linux hasn't been tested very extensively. We would appreciate any insight from people who have experience with Java on Linux.

from blink1.

meza avatar meza commented on May 20, 2024

I'll happily help once we solve this :)

Marton Meszaros
+447523539825
www.meza.hu
skype: vsb-meza

(The email has been sent from my phone. I am on the go, so my reply time
may vary.)
On 1 Feb 2013 21:21, "Tod E. Kurt" [email protected] wrote:

The Java wrapper under Linux hasn't been tested very extensively. We would
appreciate any insight from people who have experience with Java on Linux.


Reply to this email directly or view it on GitHubhttps://github.com//issues/40#issuecomment-13012189.

from blink1.

fredg02 avatar fredg02 commented on May 20, 2024

Hi,
I've found a way to get this working:

  1. cd blink1/commandline/hidapi/libusb
  2. make -f Makefile.linux
  3. copy the newly created libhidapi-libusb.so to your lib dir
  4. export LD_LIBRARY_PATH=
  5. export LD_PRELOAD=/libhidapi-libusb.so
  6. run you java program

It's just a workaround and hopefully not needed once we figure how it's done the right way, but it works.

HTH,

Fred

from blink1.

todbot avatar todbot commented on May 20, 2024

Thanks, Fred, this is extremely useful.
I haven't had to use LD_PRELOAD in like a decade, I forget how it's different from LD_LIBRARY_PATH

Which distro of Linux did you do this on?

from blink1.

todbot avatar todbot commented on May 20, 2024

I updated the Java/Processing library zip bundle at:
http://thingm.com/blink1/downloads/blink1-java-processing-lib.zip
that should now out-of-the box for Linux.

If you are using this directly from java, just point your LD_LIBRARY_PATH and to the unzipped directory and add the blink1.jar to your jar path. On the command line, this looks something like:

unzip blink1-java-processing-lib.zip
export BLINK1LIB=`pwd`/blink1-java-processing-lib/blink1/library
java -Djava.awt.headless=true -Djava.library.path=${BLINK1LIB} ${BLINK1LIB}/blink1.jar MyTestClass

from blink1.

reiabreu avatar reiabreu commented on May 20, 2024

Hi, Tod. The new Java/Processing library zip worked for me. Thank you.

from blink1.

fredg02 avatar fredg02 commented on May 20, 2024

I'm still running Kubuntu 10.04.04 LTS.

from blink1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.