Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6859119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:14:38+00:00 2026-05-27T02:14:38+00:00

Apologies for posting yet another Java jar question. I did have a look at

  • 0

Apologies for posting yet another Java jar question. I did have a look at the existing similar questions, but still haven’t managed to get an Example class running using advices found in existing answers.

Here’s what I tried so far:

george-profenzas-macbook:src george$ ls
Example.java    org
george-profenzas-macbook:src george$ javac -cp $CLASSPATH Example.java 
george-profenzas-macbook:src george$ ls
Example$1.class Example$2.class Example$3.class Example.class   Example.java    org
george-profenzas-macbook:src george$ java -cp $CLASSPATH Example
Exception in thread "main" java.lang.UnsatisfiedLinkError: no OpenKinect in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1045)
    at org.openkinect.Context.<clinit>(Context.java:43)
    at Example.main(Example.java:52)
george-profenzas-macbook:src george$ echo $CLASSPATH
/Users/george/Downloads/shiffman-libfreenect-2e0f185/wrappers/java/dist/OpenKinect.jar:.

Looks like it didn’t find the path to OpenKinect. I tried copying the jar in the same folder(cp ../../dist/OpenKinect.jar) then tried running Example again:

george-profenzas-macbook:src george$ java -cp OpenKinect.jar Example
Exception in thread "main" java.lang.NoClassDefFoundError: Example
Caused by: java.lang.ClassNotFoundException: Example
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Now it seems it didn’t find the path to Example, so I assume the . in $CLASSPATH didn’t work and I don’t know why.

I kept playing with -cp back and forth but java says “no!”:

george-profenzas-macbook:src george$ java -cp "OpenKinect.jar:./Example.java" Example
Exception in thread "main" java.lang.NoClassDefFoundError: Example
Caused by: java.lang.ClassNotFoundException: Example
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
george-profenzas-macbook:src george$ java -cp "OpenKinect.jar:." Example
Exception in thread "main" java.lang.UnsatisfiedLinkError: no OpenKinect in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1045)
    at org.openkinect.Context.<clinit>(Context.java:43)
    at Example.main(Example.java:52)
george-profenzas-macbook:src george$ java -cp .:OpenKinect.jar Example
Exception in thread "main" java.lang.UnsatisfiedLinkError: no OpenKinect in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1045)
    at org.openkinect.Context.<clinit>(Context.java:43)
    at Example.main(Example.java:52)

It seems that it either finds the path to the jar, but not to Example or the other way around and I’m running around in circles.
I set the java path to point to 1.6 64bit, so java -version prints:

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)

and I even copied the jar to /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Classes and jnilib to /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Libraries, but no joy.

Any tips ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:14:38+00:00Added an answer on May 27, 2026 at 2:14 am

    What you have here is a misunderstanding of the error message. There is a difference between the classpath and the library path. While you got the classpath correct with the jar and the dot for the current directory, you do not specify the path to where the native parts of the Kinect SDK are.

    You do so by adding

    -Djava.libray.path=(path to where the native Kinect libs lie)
    

    I do not know the OpenKinect structure, but often it is some kind of “bin” or “native” directory.

    To clarify: this is the path where OpenKinect.dll (for Windows) or libOpenKinect.so (Linux and friends) etc. are located.

    See http://openkinect.org/wiki/Java_JNI_Wrapper at the very bottom of the page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Apologies in advance for the long-winded question. I'm really a database programmer, but have
Apologies for posting such long, non-compilable code. But despite reading several questions and answers
I am having dumb monday so my apologies for posting such a newbie-like question.
Spent the good part of this morning working through this, but still…. apologies if
Apologies for cross posting (I asked this on the Silverlight Forum but got no
My apologies in advance for posting such a lengthy question. Believe it or not,
Apologies for not posting any code for this but all my efforts seem to
I did search before posting this question and didn't find anything directly related, so
Apologies for the very basic question - crash course in javascript coming up! But
Apologies if this a newbish question, but I'm new to Mac programming, and thought

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.