1

I've tried importing from a jar file (quickhull3d for example) in Processing 2.2.1 and 3.2.1 on Linux and Mac based on the instructions given here

My directory structure looks like this

../Processing/Sketchbook/libraries/quickhull3d/library/quickhull3d.jar

The Processing IDE preferences set the sketchbook location to ../Processing/Sketchbook

In my .pde file, I have the opening line

import quickhull3d.*;

and I get the error:

No library found for quickhull3d Libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder.

Note: I have seen this question asked repeatedly both here and on the Processing forum and to the best of my ability to tell, I am following the instructions as written. I have restarted the IDE before attempting to run the sketch and I have also tried copying quickhull3d.jar to /mysketch/code, which is manually doing what the IDE would do if you were to drag and drop the file onto it.

Follow up: Upon further investigation, it looks like the problem is that the .jar file itself does not point to the correct locations for the xyz.class files, so I believe this may be the culprit. Additionally, I discovered that the ComputationalGeometry contributed library for Processing contains QuickHull3d, obviating the need for me to install it manually. In the future, I will make certain the paths in the .jar are correct.

Greg von Winckel
  • 2,261
  • 2
  • 16
  • 14

1 Answers1

2

If you're using the Processing editor, the easiest way to install a non-standard library is to just drag the .jar file onto your Processing editor. This will move the .jar file into your sketch folder, and you can use it just like you can use any other library.

Kevin Workman
  • 41,537
  • 9
  • 68
  • 107
  • That is equivalent to placing it in the /mysketch/code folder, which Processing will create and do if you take this path. It still does not find the library. – Greg von Winckel Oct 19 '16 at 17:11
  • @GregvonWinckel It works fine for me. Make sure you've deleted the directories you created while trying to install it yourself. – Kevin Workman Oct 19 '16 at 18:08
  • I just did this and get the message: The package :quickhull3d" does not exist. You might be missing a library. In the black window it again says Libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder. – Greg von Winckel Oct 19 '16 at 18:58
  • @GregvonWinckel It sounds like something to messed up with the libraries directory of your Processing. Honestly the easiest thing to do might be to uninstall all versions of Processing, delete any library directories, then reinstall Processing and try simply dragging the jar onto your PDE. That works perfectly for me, so something is messed up with your configuration. – Kevin Workman Oct 19 '16 at 19:09