andreypdr / simple-openni

Automatically exported from code.google.com/p/simple-openni
0 stars 0 forks source link

Expecting an absolute path of the library: /SimpleOpenNI/library/win64/OpenNI2.dll #73

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Compile application with proccessing.
2.run application

What is the expected output? What do you see instead?
Application faild to load openni libs with error:

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: 
Expecting an absolute path of the library: 
/SimpleOpenNI/library/win64/OpenNI2.dll
        at java.lang.Runtime.load0(Unknown Source)
        at java.lang.System.load(Unknown Source)
        at SimpleOpenNI.SimpleOpenNI.<clinit>(SimpleOpenNI.java:59)
        at sketch_130901a.setup(sketch_130901a.java:38)
        at processing.core.PApplet.handleDraw(PApplet.java:2280)
        at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:243)

        at processing.core.PApplet.run(PApplet.java:2176)
        at java.lang.Thread.run(Unknown Source)

What version of the product are you using? On what operating system?
Operation System: Windows 7 sp1 x64.
Problem exist also on 32 bit os.

SOLUTION:
Problem begins from simpleOpenNI.class, trying to load libs from 
"/SimpleOpenNI/library/" withou success.

I download the simpleOpenNI.java and i patched to take the current directory 
adreess and in nativLibPath string.

To patch the java file simple add this line:
static String workingDir = System.getProperty("user.dir");
after public class SimpleOpenNI extends ContextWrapper implements 
SimpleOpenNIConstants
{
and change 2 lines (32X and x64)from:
nativLibPath = getLibraryPathWin() "\\lib\\";
to:
nativLibPath = getLibraryPathWin() +  workingDir + "\\lib\\";
compile the file and put it on simpleOpenNI.jar\SimpleOpenNI\

or download the atteched file and put it on:
 simpleOpenNI.jar\SimpleOpenNI\ located on folder lib!

Original issue reported on code.google.com by kostas.n...@gmail.com on 2 Sep 2013 at 2:11

Attachments:

GoogleCodeExporter commented 8 years ago
if you experience the same problem download the attachement file and extract it 
on My Documents\Processing\libraries\SimpleOpenNI\library

Original comment by kostas.n...@gmail.com on 2 Sep 2013 at 2:19

GoogleCodeExporter commented 8 years ago
I replaced this new jar with the previous one and I still get the same error

Original comment by casondra...@gmail.com on 24 Oct 2013 at 3:18

GoogleCodeExporter commented 8 years ago
I am having similar problem on a mac and can't get an application to run. 
Here is my error from the console:
HAS ANYONE figured out how to run a processing application on a mac from a mac 
using the simple OpenNI libraries?

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: 
SimpleOpenNI.SimpleOp at SimpleOpenNI.SimpleOpenNiJNI.swig_module_init(Native 
Method) at SimpleOpenNI.SimpleOpenNIJNI.(SimpleOpenNIJNI.java:290) at 
SimpleOpenNI.ContextWrapper.(ContextWrapper.java:54) at 
SimpleOpenNI.SimpleOpenNI.(SimpleOpenNi.java:256) at 
LanScapesLerp.setup(LanScapesLerp.java:126) at 
processing.core.PApplet.run(PApplet.java:1530) at 
processing.core.PApplet.handleDraw(PApplet.java:1608) at 
java.lang.Thread.run(Thread.java:680)

Original comment by gabriell...@gmail.com on 2 Nov 2013 at 8:00

GoogleCodeExporter commented 8 years ago
I have the same problem on my mac. Even the "examples" that come with the 
library doesn't work when exported. It just work in "run" and "present".
Processing 2.1
SimpleOpenNI-1.96
macosX 10.9

Original comment by boladene...@gmail.com on 20 Nov 2013 at 6:00

GoogleCodeExporter commented 8 years ago
It helps me to use SimpleOpenNI with eclipse! I was able to know where to put 
all the dll files with your jar file. Thank you!

Original comment by florent....@gmail.com on 11 Jan 2014 at 9:34

GoogleCodeExporter commented 8 years ago
Thank you! Helped me to integrate SimpleOpenNI with Eclipse.

Original comment by ashin.ma...@gmail.com on 4 Mar 2014 at 2:58

GoogleCodeExporter commented 8 years ago
Thank you :) This helped me to create portable,runnable .jar files, that use 
the SimpleOpenNI library (because you pointed out where to manipulate the 
locations of the required libraries ;)). You just fixed the windows part, 
didn't you? I took your fix and just applied it to the osx and win part of 
these methods in the head of the SimpleOpenNI.java file... I could contribute a 
patched .jar file for this, if some linux or osx users need it?! :) peace

Original comment by edzweist...@googlemail.com on 11 Oct 2014 at 8:04

GoogleCodeExporter commented 8 years ago
YES PLEASE. I was wondering why the patched .jar above didn't work on OS X. 
Yours works on Mac and Linux too? That would be wonderful if you could share it!

Original comment by foxg...@gmail.com on 11 Oct 2014 at 11:14

GoogleCodeExporter commented 8 years ago
Yeap only windows part fixed, if you want to fix the osx part just ask it, i 
can fixit ;)

Original comment by kostas.n...@gmail.com on 12 Oct 2014 at 5:37

GoogleCodeExporter commented 8 years ago
YES I AM ASKING. :) ...this fix should give us cross-platform apps that run on 
both OpenNI and MS SDK...!

Original comment by foxg...@gmail.com on 12 Oct 2014 at 7:19

GoogleCodeExporter commented 8 years ago
Ok, i will patched tonight and i will upload it here. 

Original comment by orgi...@gmail.com on 13 Oct 2014 at 7:28

GoogleCodeExporter commented 8 years ago
Any luck with the OS X fix?

Original comment by foxg...@gmail.com on 2 Nov 2014 at 11:46

GoogleCodeExporter commented 8 years ago
Any update on an OS X fix? Might be able to help if you're stuck.

Original comment by foxg...@gmail.com on 8 Feb 2015 at 7:51

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The suggested jar helps to export on Windows 7. But processing version doesn't 
work with it. =) So I switch them when I need to.

Original comment by sphinx2...@gmail.com on 26 Mar 2015 at 5:50