Importing a library when using a 3rd party IDE (atom.io, sublime text, etc)

Hi everyone

I'm having some trouble figuring out how to import a library when using atom.io as my IDE

I'm trying to use peasycam, with this at the top of my sketch:

import /lib/peasycam/library/peasycam.jar.*;

and a folder structure like:

projectFolder/ sketch.pde lib/ peasycam/ library/ peasycam.jar

Is the .jar even the correct file to be importing? Can anyone explain how to do this?

Thanks

Tagged:

Answers

  • Don't know atom but I assume it's a Java editor. Is there a way to import a standard java .jar library? I assume it would work in the same way. Since it's pure Java, it won't know to look in the lib folder unless you pointed atom there.

  • import /lib/peasycam/library/peasycam.jar.*;

    This should be the package name, not the filename. If you do the same within processing you get

    import com.peasy.*;
    

    (From memory)

    Then you have to make sure the jar is in your class party so it can find it at both compile time and runtime

  • @koogs You meant class path L-)

Sign In or Register to comment.