2

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);
}
Kazu
  • 21
  • 3

1 Answers1

1

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)

George Profenza
  • 50,687
  • 19
  • 144
  • 218
  • Sorry! I forgot to include the import ddf.minim.*; in my question... Actually I have that one In my code. – Kazu Jul 08 '21 at 00:18
  • Interesting. Are you using the Processing IDE or a different IDE (e.g. eclipse, IntelliJ, NetBeans, etc.) ? Have you tried reinstalling the Minim library ? – George Profenza Jul 08 '21 at 00:19
  • I just researched around that and found out perhaps it's about clas path error. But I haven't ever worked on Java stuff so I have no idea how to fix it... Do you know useful information around that? – Kazu Jul 08 '21 at 00:21
  • Did reinstalling the Minim library change anything ? (e.g. use Sketch > Import Library > Add Library > search for Minim to first remove then re-add the library) – George Profenza Jul 08 '21 at 00:23
  • I tried but still getting the error. By the way, I realized that I installed Processing itself on OneDrive. I assume that might be problematic. So I'm gonna try to reinstall to another location and see what will happen. – Kazu Jul 08 '21 at 01:26