0

I'm writing an application that makes use of Java's speech API and FreeTTS. The application works fine when I run it from the Netbeans IDE, but when I try to run it from a jar file on my local machine or on other machines, I get the following error:

"java.lang.NoClassDefFoundError: com/sun/speech/freetts/VoiceManager"

Is there any way for me to include the FreeTTS files in my jar file so it can run anywhere?

Any help would be greatly appreciated.

InsaneOstrich
  • 119
  • 5
  • 13
  • Why not include the FreeTTS jar file itself with your distribution? – Hovercraft Full Of Eels Sep 15 '11 at 02:39
  • RTFM. The documentation on their site tells you all you need to know. http://freetts.sourceforge.net/docs/index.html#how_app – Hovercraft Full Of Eels Sep 15 '11 at 02:43
  • I've read the manual, and it actually says very little about this. It says something about including the jar file in a class path, but doesn't say how this is accomplished or even if it would be necessary to do this on every machine that runs a program that makes use of freetts. – InsaneOstrich Sep 15 '11 at 02:50

1 Answers1

2

i had the same problem and i found this page: http://ondra.zizka.cz/stranky/programovani/java/misc/freetts-line-unavailable-classcastexception-kevinvoicedirectory-error-opening-zipfile.texy

I did the easy way, which was to add the freetts installation to my dist folder, change the manifest of my jar on where to find the jsapi.jar, freetts.jar etc. and it is worked. I am just distributing freetts inside my folder.

The hard way is on the link above.

Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
Ioannis Soultatos
  • 120
  • 1
  • 1
  • 9