Freetts: projects works inside the IDE (netbeans and eclipse) but the exported jar give errors
thank you for reading this.
i m using freetts to make my program speak some text... While inside the IDE, when i run all the programs, they work fine.(mine and all freetts example programs).
Also the runnable programs (jar) that come with the bin download of freetts, run on terminal fine.... Freetts --> http://sourceforge.net/projects/freetts/files/
Well the exact same programs doesn't work when i export them from the IDE. Tried both netbeans and eclipse to export the programs but i m getting errors.
i m suspecting it has to do with the jar files i include in the projects (jsapi.jar, freetts.jar,freetts-jsapi10.jar). i mean that somehow it may be forbidden to use them this way but maybe i m talking nonsense.
Anyone know what's happening?
i m posting 3 different errors i m getting on terminal from 3 programs distributions that work fine on IDEs... sorry for the long post
1.
java -jar JSAPIClock.jar
checkPoint1
java.lang.NullPointerException
at jsapiclock.JSAPIClock.createSynthesizer(JSAPIClock.java:49)
at jsapiclock.JSAPIClock.main(JSAPIClock.java:86)
checkPoint2
checkPoint3
checkPoint4
The time is now, almost half past six, in the evening.
Exception in thread "Thread-1" java.lang.NullPointerException
at jsapiclock.JSAPIClock.speak(JSAPIClock.java:74)
at jsapiclock.Clock.speakTime(Clock.java:233)
at jsapiclock.Clock.access$000(Clock.java:41)
at jsapiclock.Clock$ClockThread.run(Clock.java:269)
2.notice that Speech.properties file is included in both directories below
java -jar HelloWorld.jar
All general Mode JSAPI Synthesizers and Voices:
Using voice: kevin16
No synthesizer created. This may be the result of any
number of problems. It's typically due to a missing
"speech.properties" file that should be at either of
these locations:
user.home : /home/yiannis
java.home/lib: /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib
Another cause of this problem might be corrupt or missing
voice jar files in the freetts lib directory. This problem
also sometimes arises when the freetts.jar file is corrupt
or missing. Sorry about that. Please check for these
various conditions and then try again.
3.This is weird actually
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:72)
at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:72)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:48)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:55)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
at java.net.JarURLConnection.getManifest(JarURLConnection.java:217)
at java.net.JarURLConnection.getMainAttributes(JarURLConnection.java:269)
at com.sun.speech.freetts.VoiceManager.getDependencyURLs(VoiceManager.java:251)
at com.sun.speech.freetts.VoiceManager.getDependencyURLs(VoiceManager.java:283)
at com.sun.speech.freetts.VoiceManager.getVoiceDirectories(VoiceManager.java:173)
at com.sun.speech.freetts.VoiceManager.getVoices(VoiceManager.java:110)
at com.sun.speech.freetts.jsapi.FreeTTSEngineCentral.createEngineList(FreeTTSEngineCentral.java:85)
at blah2.CustomSpeaker.createSynthesizer(CustomSpeaker.java:34)
at blah2.FullScreenBox.<init>(FullScreenBox.java:49)
at blah2.Blah2View.actionPerformed(Blah2View.java:323)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6288)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6053)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4651)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
System property "mbrola.base" is undefined. Will not use MBROLA voices.
java.lang.NullPointerException
at blah2.CustomSpeaker.createSynthesizer(CustomSpeaker.java:36)
at blah2.FullScreenBox.<init>(FullScreenBox.java:49)
at blah2.Blah2View.actionPerformed(Blah2View.java:323)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6288)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6053)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4651)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.开发者_StackOverflow中文版java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "Thread-1" java.lang.NullPointerException
at blah2.CustomSpeaker.speak(CustomSpeaker.java:61)
at blah2.Speaker$SpeakerThread.run(Speaker.java:42)
精彩评论