Question

I've been searching for an answer all night and morning and I'm almost about to give up. I was hoping someone here has had the same problem has and has figured it out.

Basically, I've developed a project on Windows using Eclipse and I would like to run it on my Raspberry Pi. Of course it's no problem, normally, but I'm trying to use a library.

The library is FreeTTS. It works fine on Windows but when I go to use it on my Pi, it can't find the location of the library. I've tried everything and my brain in fried.

The structure of my project is: bin - compiled classes src - source files lib - libraries (include freetts.jar)

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/speech/freetts/VoiceManager

In Eclipse, I have the libs connected to the project relatively.

Any ideas?

Was it helpful?

Solution

From the directory containing bin and lib, your command should look like:

java -cp bin:lib/freetts.jar com.brandonmxb.bpi.Main

That puts both the bin directory and the jar on the classpath, separated by : (; on Windows).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top