We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've put the jar file into a directory like this:
/libraries/nameofthelib/library/nameofthelib.jar
But I cant find Java.Library.Path
anywhere in the Processing settings.
Anyone have any ideas how to get a library into Java.Library.Path
?
I'm using a Mac.
/stf
Answers
Install any contributed library through the PDE Contributions Manager you will find it in your sketch-folder/libraries this will show how the library folder is structured. You shouldn't need the library.properties file since it is used by Processing when looking for updates.
I'm assuming that library being attempted to install manually isn't available in PDE. L-)
Me too.
but I've created:
/libraries/nameofthelib/library/nameofthelib.jar
Is not
/libraries/nameofthelib
correct for the filenameofthelib.jar
?Oops! I guess I've mixed up those library names! X_X
Correct path: "Sketchbook"/libraries/"Name_of_Library"/library/"Name_of_Library.jar".
Yes, the path was correct.
Looking at the installed libraries' directory structures, I note there is most often, though not always, a
/src
folder in addition to the/library
folder. This/src
folder contains.java
files. The.jar
file that I have only contains.class
files, I think. Relevant?/stf
Nope. Those are just source code files which still need to be compiled & compressed as 1 ".jar".
I'm sorry, I mis-spoke. In this case, I only have a
.jar
file, and IT contains only.class
files. I don't actually have the.java
files. I think I'm going to have to look into what the requirements are for a.jar
file to work in Processing...The requirements are in my 1st replay plus @quark's too.
In short, in most cases, only the ".jar" file is needed, nothing else.
The source (.java) files are not needed by the Processing, only the jar file containing the .class files
What is the name of the library, can you provide a link to the original jar file?
Ok, that is extremely helpful to know. In other words, the .java files in the /src folders found in most installed libraries are really there for the user's edification?
The file I'm working with is named
red5streaming.jar
and its athttps://github.com/red5pro/streaming-android/tree/master/app/libs
Its a streaming server sdk.
thanks for your comment!
That library seems to be dependent on ".so" files too.
In those cases, the ".jar" alone won't do. But I dunno what to do on such complex arrangements.
Ok, so at
https://github.com/red5pro/streaming-android/tree/master/app/src/main/jniLibs
are the folders:
arm64-v8a, armeabi-v7a, x86
each containing two source files:
libred5android.so, libred5streaming.so
and now I see that the entire streaming SDK is just the
.jar
file plus these three directories...can you please tell me, though, exactly how you determined the .so dependancy? can any information about the path be derived from the
.jar
file?I've tried locating the
jniLibs
heirarchy in/libraries/red5streaming/
a few different spots but the error persists.I'm trying to find another Processing library containing .so files, but haven't yet.
I do:
println(System.getProperty("java.library.path"));
and get:
:/Applications/Processing.app/Contents/Resources/Java:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources:.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
I guess I will be looking into creating symbolic links in these directories to the jniLibs...
I haven't checked the contents of that ".jar". Both ".so" & ".dll" files are generally C/C++ compiled code to access the hardware.
GoToLoop: can you recommend a (free) tool or Eclipse plugin that will allow me to determine whether a .jar file relies on external .so files?
And thank you for your comments!
I don't have Eclipse. But for comparison, take a look at Processing's video library.
You're gonna see lotsa subfolders w/ ".dll", ".dylib" and ".so" files there.