This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Runtime Error - JSAPI HelloWorld Program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Runtime Error - JSAPI HelloWorld Program" Watch "Runtime Error - JSAPI HelloWorld Program" New topic
Author

Runtime Error - JSAPI HelloWorld Program

Roshan Kumar
Greenhorn

Joined: Feb 04, 2012
Posts: 2
While running basic HelloWorld program using JSAPI, it is showing error "java.lang.NullPointerException at HelloWorld.main(HelloWorld.java:11)"

Following is the code:

I edit my program:

and it is giving output:

It seems that SynthesizerModeDesc is working fine but it is not detecting any engine as i tried passing null also to the function Central.createSynthesizer (i.e get default engine) but still it is returning null. I checked number of engines it is detecting, but it shows 0.

Please help me !!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Runtime Error - JSAPI HelloWorld Program
 
Similar Threads
Help needed regarding jsapi
Help needed in Java Speech API programming
Java speech & Java Telephony
Null pointer exception in code
Java Speech API: Changing the voice