ClassNotFoundException: ddf.minim.Minim

453 Views Asked by At

I came across this error for few hours. I've been using minim to play a soundfile in my sketch on Windows 10. Until yesterday it just worked fine, but today I came across the error.

java.lang.NoClassDefFoundError: ddf/minim/Recordable

or sometime

ClassNotFoundException: ddf.minim.Minim

So I can't run the sketch.

Currently, the error shows up only on my windows10. But on my MacBook that works just as fine. Does Anybody has ever come across this issue here?

My code:

import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
import ddf.minim.signals.*;
import ddf.minim.spi.*;
import ddf.minim.ugens.*;

Minim minim;
AudioSample audio;

void setup() {
minim = new Minim(this);
audio = minim.loadSample("greeting.wav", 2048);
}
void draw() {
}
void mousePressed() {
audio.trigger();
ellipse(mouseX, mouseY, 50, 50);
}
1

There are 1 best solutions below

5
George Profenza On

You seem to be missing:

import ddf.minim.*;

Perhaps that line got accidentally deleted ?

(Off topic: try CMD+T to easily format the code: makes it easier to read/spot errors on the long run)