Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Mar 18, 2016 · 15 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 2 Sep 2013 at 2:11

Attachments:

@GoogleCodeExporter
Copy link
Author

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

Original comment by [email protected] on 2 Sep 2013 at 2:19

@GoogleCodeExporter
Copy link
Author

I replaced this new jar with the previous one and I still get the same error

Original comment by [email protected] on 24 Oct 2013 at 3:18

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 2 Nov 2013 at 8:00

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 20 Nov 2013 at 6:00

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 11 Jan 2014 at 9:34

@GoogleCodeExporter
Copy link
Author

Thank you! Helped me to integrate SimpleOpenNI with Eclipse.

Original comment by [email protected] on 4 Mar 2014 at 2:58

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 11 Oct 2014 at 8:04

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 11 Oct 2014 at 11:14

@GoogleCodeExporter
Copy link
Author

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

Original comment by [email protected] on 12 Oct 2014 at 5:37

@GoogleCodeExporter
Copy link
Author

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

Original comment by [email protected] on 12 Oct 2014 at 7:19

@GoogleCodeExporter
Copy link
Author

Ok, i will patched tonight and i will upload it here. 

Original comment by [email protected] on 13 Oct 2014 at 7:28

@GoogleCodeExporter
Copy link
Author

Any luck with the OS X fix?

Original comment by [email protected] on 2 Nov 2014 at 11:46

@GoogleCodeExporter
Copy link
Author

Any update on an OS X fix? Might be able to help if you're stuck.

Original comment by [email protected] on 8 Feb 2015 at 7:51

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 26 Mar 2015 at 5:50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant