# Library (again)

**URL:** <https://discourse.processing.org/t/library-again/21288>\
**Category:** Development\
**Created:** [May 25, 2020, 6:15pm UTC](https://discourse.processing.org/t/library-again/21288 "2020-05-25T18:15:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MartinGo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/martingo/32/9546_2.png) [@MartinGo](https://discourse.processing.org/u/MartinGo)\
**Post date:** [May 25, 2020, 6:15pm UTC](https://discourse.processing.org/t/library-again/21288/1 "2020-05-25T18:15:43Z")

</div>

Hi everyone, I have a question that probably was made a lot of times but I need an updated answer.  
How do I make a library?  
I want to make a tilemap library for Processing but I don’t know how to proceed. I found a lot of info about this but mostly is for previous versions of Processing, should I use Eclipse? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Schred](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/schred/32/13146_2.png) [@Schred](https://discourse.processing.org/u/Schred)\
**Post date:** [May 25, 2020, 6:47pm UTC](https://discourse.processing.org/t/library-again/21288/2 "2020-05-25T18:47:29Z")

</div>

Take a look at [this video](https://www.youtube.com/watch?v=pI2gvl9sdtE) from Daniel Shiffman, it should help you out. ;D

---

<div class="post-metadata">

**Author:** ![MartinGo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/martingo/32/9546_2.png) [@MartinGo](https://discourse.processing.org/u/MartinGo)\
**Post date:** [May 25, 2020, 8:48pm UTC](https://discourse.processing.org/t/library-again/21288/3 "2020-05-25T20:48:09Z")

</div>

Thanks, I’ll check it out 🙂

---

<div class="post-metadata">

**Author:** ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)\
**Post date:** [May 25, 2020, 9:32pm UTC](https://discourse.processing.org/t/library-again/21288/4 "2020-05-25T21:32:12Z")

</div>

Shameless self-promotion: this tutorial talks about using Processing in Java, and includes a section on building Processing libraries.

> **[Processing in Java](https://happycoding.io/tutorials/java/processing-in-java)**
>
> Learn how to use Processing as a Java library.

---

<div class="post-metadata">

**Author:** ![uheinema](https://avatars.discourse-cdn.com/v4/letter/u/e99b99/32.png) [@uheinema](https://discourse.processing.org/u/uheinema)\
**Post date:** [May 25, 2020, 10:33pm UTC](https://discourse.processing.org/t/library-again/21288/5 "2020-05-25T22:33:44Z")

</div>

In a nutshell (for APDE)

- convert your code from pde to java package. With Apde, look at build/src/processing/test to find the generatedv java source code for your pde
- when you can compile/test in your sketch::
- find an existing and working simple library. (In lSketchbook/ibraries  
-make a copy, lets call it mylib
- rename/edit/delete/create things like revisiions.txt as per Processing rules
- in the mylib/libraries/mylib.jar (which is just a zip), remove everything
- now copy the class files as found in build/bin/classes/mylib after a sketch compile into the jar
- almost there, we have a valid jar!

- re-dex to create Sketcjbook/libraries/mylib/library-dex/mylib-dex.jar  
and it works in APDE!  
Test…  
Now update docs, examples, src, etc pp.

Preparing a tutorial for APDE, this might be the start…

---

<div class="post-metadata">

**Author:** ![uheinema](https://avatars.discourse-cdn.com/v4/letter/u/e99b99/32.png) [@uheinema](https://discourse.processing.org/u/uheinema)\
**Post date:** [May 26, 2020, 11:46pm UTC](https://discourse.processing.org/t/library-again/21288/6 "2020-05-26T23:46:05Z")

</div>

Find it here:

[https://github.com/uheinema/Building-processing-libs-with-APDE/blob/master/README.md](https://github.com/uheinema/Building-processing-libs-with-APDE/blob/master/README.md)

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [May 26, 2020, 11:59pm UTC](https://discourse.processing.org/t/library-again/21288/7 "2020-05-26T23:59:28Z")

</div>

Check the Processing wiki under Library Guidelines: [https://github.com/processing/processing/wiki](https://github.com/processing/processing/wiki)

Kf

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 29, 2020, 5:52am UTC](https://discourse.processing.org/t/library-again/21288/8 "2020-05-29T05:52:27Z")

</div>

> [@MartinGo](#):
>
> I want to make a tilemap library for Processing

You might also want to look at existing tilemap libraries and how they are set up. For example, ptmx:

> **[GitHub - linux-man/ptmx: Use Tiled maps on your Processing sketch.](https://github.com/linux-man/ptmx)**
>
> Use Tiled maps on your Processing sketch. Contribute to linux-man/ptmx development by creating an account on GitHub.
