# Running a Processing 4 PApplet in Eclipse IDE

**URL:** <https://discourse.processing.org/t/running-a-processing-4-papplet-in-eclipse-ide/44792>\
**Category:** Libraries\
**Created:** [July 21, 2024, 4:58pm UTC](https://discourse.processing.org/t/running-a-processing-4-papplet-in-eclipse-ide/44792 "2024-07-21T16:58:27Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [July 22, 2024, 2:32pm UTC](https://discourse.processing.org/t/running-a-processing-4-papplet-in-eclipse-ide/44792/9 "2024-07-22T14:32:17Z")

</div>

I have used Eclipse (since 2009) for developing several Processing libraries and I have found the following strategy works for me.

A minimum of _two_ Eclipse projects  
**Project 1**  
This contains the source code , resources, ant scripts etc. to build the library.

**Project 2.**  
This project contains all the tests, experiments and demo sketches used while developing the library.

In both projects the library path will be linked to any necessary Processing jars .

In project 2 we don’t link to our library jar rather we link to the actual library project. This makes debug mode and stepping through code so much more useful as it just slips into the library code.

My favourite way of coding main is

```auto
public class TestPixelAudio extends PApplet {

	public static void main(String[] args) {
		PApplet.main(new String[]{TestPixelAudio.class.getName()});
	}

```

This has two benefits

1. the package name is included in the class name when using `getName()`
2. Changing the class name through refactoring will automatically update the `main()` method

---

_[View the full topic](https://discourse.processing.org/t/running-a-processing-4-papplet-in-eclipse-ide/44792)._
