спасибо, что прочитали это.
я использую freetts, чтобы моя программа говорила какой-то текст ... В то время как внутри IDE, когда я запускаю все программы, они работают нормально (мой и все примеры freetts)программы).
Также запускаемые программы (jar), которые поставляются с загрузкой freetts в бункер, работают на терминале нормально .... Freetts -> http://sourceforge.net/projects/freetts/files/
Ну, точно такие же программы не 'не работает, когда я экспортирую их из IDE.Пробовал и netbeans, и eclipse для экспорта программ, но я получаю ошибки.
я подозреваю, что это связано с файлами jar, которые я включаю в проекты (jsapi.jar, freetts.jar, freetts-jsapi10.jar),Я имею в виду, что каким-то образом может быть запрещено использовать их таким образом, но, может быть, я говорю чепуху.
Кто-нибудь знает, что происходит?
Я публикую 3 различные ошибки, которые я получаю на терминале из 3дистрибутивы программ, которые отлично работают в IDE ... извините за длинный пост
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. обратите внимание, что файл Speech.properties включен в оба каталога ниже
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. Это странно на самом деле
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.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)