# Not sure how to fix this

**URL:** <https://discourse.processing.org/t/not-sure-how-to-fix-this/6660>\
**Category:** Libraries\
**Created:** [December 16, 2018, 6:10pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660 "2018-12-16T18:10:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![charmypatel](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Post date:** [December 16, 2018, 6:10pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/1 "2018-12-16T18:10:35Z")

</div>

Hi I’m transferred my Processing code into Eclipse to run it and I keep getting this error, I’m not sure what it means or how to fix it. I tried seeing if similar people were getting this error on Github but was not able to find the same exact error that I have. The problem that I’m having it the animation is running but I just get a grey screen and nothing shows up. I downloaded the core jar file and minim as well since I have it in my animation. I tried everything by changing code around and adding the public void setup() { that it told me to add but I still can’t get it to run. I also tried adding a print statement to see if that would work which it does but my animation still does not show up and I get a grey screen when running it. I am using Processing 3.If anyone has suggestions on how to fix this please let me know. ![1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/cf2e0246b2bf03b3a417ad9fcaff39a2c2d7aaec.png)

---

<div class="post-metadata">

**Author:** ![figraham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/figraham/32/4161_2.png) [@figraham](https://discourse.processing.org/u/figraham)\
**Post date:** [December 16, 2018, 6:19pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/2 "2018-12-16T18:19:51Z")

</div>

Could you post your code that might make it more clear? Are you using any processing libraries? What JDK are you using?

---

<div class="post-metadata">

**Author:** ![figraham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/figraham/32/4161_2.png) [@figraham](https://discourse.processing.org/u/figraham)\
**Post date:** [December 16, 2018, 6:34pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/5 "2018-12-16T18:34:27Z")

</div>

Sometimes when using libraries they don’t import easily. It looks like your minim library is looking for a class called JSMinim. Either the library is missing a dependency or it’s built in a modular way and it’s missing a part that is separate from the core. You can see how multiple jar files are included in the library. I’ve had this problem a couple times. My solution is to just add all the jars to the build path. Someone might know a more elegant solution for this problem. If I was to guess it’s a class in the jsminim.jar because that’s the name of the class that’s causing the error.  
 ![minim](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/56c025bcc431b7515fd193a957cd799ee6da8f86.png)

---

<div class="post-metadata">

**Author:** ![charmypatel](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Post date:** [December 16, 2018, 6:35pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/7 "2018-12-16T18:35:45Z")

</div>

You mean all of the jar files that show up when you select the processing library folder to import?

---

<div class="post-metadata">

**Author:** ![figraham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/figraham/32/4161_2.png) [@figraham](https://discourse.processing.org/u/figraham)\
**Post date:** [December 16, 2018, 6:37pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/8 "2018-12-16T18:37:47Z")

</div>

No it’s the ones in the minim library itself. I found a zip file [here](http://code.compartmental.net/minim/). When you unzip it they’re under the library directory.

---

<div class="post-metadata">

**Author:** ![charmypatel](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Post date:** [December 16, 2018, 6:49pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/10 "2018-12-16T18:49:56Z")

</div>

This would be the correct one right? Isnt it supposed to say minim.jar?  
 ![1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e77871524f367ccc6c02fa5ec4d3a7336d7da74f.png)

---

<div class="post-metadata">

**Author:** ![charmypatel](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Post date:** [December 16, 2018, 6:58pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/11 "2018-12-16T18:58:18Z")

</div>

This is the jar file that I have downloaded now and this is the error I get now still cant run this.  
 ![1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/4/4a802ba444a088f4640ce4e7581eaafd5858eafe.png) ![2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/7097c46f0244e41dfc27639b30779b89f9208a9f.png)

---

<div class="post-metadata">

**Author:** ![figraham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/figraham/32/4161_2.png) [@figraham](https://discourse.processing.org/u/figraham)\
**Post date:** [December 16, 2018, 7:01pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/12 "2018-12-16T19:01:31Z")

</div>

It looks like you’re in the source folder try the following

Import \> File System \> Browse \> locate the minim unzipped file \> library \> Select Folder. Should see something like the image below. Add everything except for export.txt.

Then they should show up in your project and add them to the build path.

![minim2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/a2aa4733905d72390af0f8d594e3eb2a60d087f8.png)

---

<div class="post-metadata">

**Author:** ![charmypatel](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Post date:** [December 16, 2018, 7:04pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/14 "2018-12-16T19:04:33Z")

</div>

Changed it to this, it doesnt run still  
 ![1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/ad8319d740073328d8edc80201b26cf79eb941a0.png)

---

<div class="post-metadata">

**Author:** ![charmypatel](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Post date:** [December 16, 2018, 7:09pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/15 "2018-12-16T19:09:12Z")

</div>

Also I am still getting the same thing with the error:

Error: Could not find or load main class Sketch  
Caused by: java.lang.ClassNotFoundException: Sketch

---

<div class="post-metadata">

**Author:** ![figraham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/figraham/32/4161_2.png) [@figraham](https://discourse.processing.org/u/figraham)\
**Post date:** [December 16, 2018, 7:11pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/16 "2018-12-16T19:11:49Z")

</div>

Is your sketch in the default package?

---

<div class="post-metadata">

**Author:** ![charmypatel](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Post date:** [December 16, 2018, 7:14pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/18 "2018-12-16T19:14:26Z")

</div>

I have Sketch and star in the default package along with the songs. Songs should be in the default package correct?  
 ![1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/98c26b2f8038a56c0c02bc4d3a5c12cb8ca1dbec.png)

---

<div class="post-metadata">

**Author:** ![figraham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/figraham/32/4161_2.png) [@figraham](https://discourse.processing.org/u/figraham)\
**Post date:** [December 16, 2018, 7:20pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/19 "2018-12-16T19:20:42Z")

</div>

Yeah it’s just you have to use a different main method if they’re in a different package but that doesn’t apply here. I’m not sure what’s going wrong. I would suggest starting a fresh project and add things in one at a time. Might be tedious but it should become very clear what the section of code the problem is in. Sorry I haven’t been more helpful.

---

<div class="post-metadata">

**Author:** ![charmypatel](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Post date:** [December 16, 2018, 7:23pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/21 "2018-12-16T19:23:08Z")

</div>

I redid this many times but I’m still getting the same error. I’m not sure what you mean by different main method. What should it be instead?

---

<div class="post-metadata">

**Author:** ![figraham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/figraham/32/4161_2.png) [@figraham](https://discourse.processing.org/u/figraham)\
**Post date:** [December 16, 2018, 7:28pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/22 "2018-12-16T19:28:51Z")

</div>

Say your Sketch class is in a package like com.example then you would use.

```auto
PApplet.main("com.example.Sketch");

```

I thought this might be the problem because it seems like your project is having problems finding files.

---

<div class="post-metadata">

**Author:** ![charmypatel](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Post date:** [December 16, 2018, 7:30pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/24 "2018-12-16T19:30:32Z")

</div>

Which line do I put that code on? And what do I replace the com.example with? Or do I just put it exactly like how you have it.

---

<div class="post-metadata">

**Author:** ![charmypatel](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Post date:** [December 16, 2018, 7:36pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/25 "2018-12-16T19:36:14Z")

</div>

What do I replace the come.example with? I’m guessing I need to replace that since you probably used that as an example. Also I get this when clicking on the error, what would you recommend changing when this pops up? I don’t use eclipse much so I don’t want to do anything that would change anything

 ![1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/b7e8d9f6d35039649ecf890a23516b5dc56eeda5.png)

---

<div class="post-metadata">

**Author:** ![figraham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/figraham/32/4161_2.png) [@figraham](https://discourse.processing.org/u/figraham)\
**Post date:** [December 16, 2018, 7:39pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/26 "2018-12-16T19:39:46Z")

</div>

Here’s my setup for a hello world. ![helloworld](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/9a7042901b6f1e8b2e29b533b06193d76f3e4d6a.png)

---

<div class="post-metadata">

**Author:** ![charmypatel](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Post date:** [December 16, 2018, 7:41pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/28 "2018-12-16T19:41:28Z")

</div>

Does that run for you when you try anything using minim?

---

<div class="post-metadata">

**Author:** ![figraham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/figraham/32/4161_2.png) [@figraham](https://discourse.processing.org/u/figraham)\
**Post date:** [December 16, 2018, 8:04pm UTC](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660/29 "2018-12-16T20:04:37Z")

</div>

Got the [PlayAFile](https://github.com/ddf/Minim/blob/master/examples/Basics/PlayAFile/PlayAFile.pde) example working. I ended up importing all the jars from processing and minim. Can post the code if you want but it’s exactly what’s on github except for moving the `size()` from `setup()` to `settings()`. Also not seen in the screen shot the groove.mp3 file is in the data directory directly under the project directory.

 ![minim3](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/9a894d05c6a34b02c6cba20ab644ad59159d1548.png)

[Next page](https://discourse.processing.org/t/not-sure-how-to-fix-this/6660.md?page=2)
