Today I was able to get an example working in Netbeans 5.5.1 without using the ANT described in the installation manual. Because NetBeans has it's own ANT build in, all you need to do is create a new project and use the existing ant script provided by the JSAPI2. Here are the steps I followed in order to get the example projects loaded into NetBeans:
1. Select New Project... from the File menu. This will pop a New Project window.
2. Select General in Categories and after choose a Java Project with Existing Ant Script.
3. Click on Next button. This will pop a New Java Project with Existing Ant Script window.
4. For Location browse to the workspace folder previously specified. If you browsed to the correct folder, all remained blank form will be filled automatically.
5. Click on Set as Main Project. Click on Next button. This will show Build and Run Actions tab.
6. If you followed correctly upper instructions, first three forms will be filled according to theirs label names. Click on Next button. This will show Source Package Folders tab.
7. Click on Add Folder... button for Source Package Folders and select lib folder. Add com and edu folder following same operations, then press OK.
8. Click on Add Folder... button for Test Package Folders and select tests folder. Add demo folder following same operations, then press OK.
9. Select JDK 5 in the Source level field. Click on Next button. This will show Java Sources Classpath tab.
10. Click on Finish button.
The program now compiles in Netbeans and runs. I haven't tested out the debugging but I'm sure that works too. The problem is that it only works in that project. The problem I have is after I create the class, I cannot seem to use it in another java program. For example. I used the j2sehello application, modified it a little bit, compiled it and ran it in NetBeans. It ran fine as a standalone program. After I add the "j2sehello.jar" file to my new program, it compiles just fine. It's when I run the program it comes up with all these errors that I didn't see in the standalone application:
java.lang.IllegalArgumentException: javax.speech.EngineManager: no class found for com.conversay.speech.C5EngineListFactory
at javax.speech.EngineManager.registerEngineListFactory(Unknown Source)
at javax.speech.EngineManager.a(Unknown Source)
at javax.speech.EngineManager.availableEngines(Unknown Source)
at org.jsapi2.examples.j2sehello.HelloWorld.response(HelloWorld.java:31)
at Prog.Prog$1.run(Prog.java:99)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
javax.speech.EngineManager: problem registering com.conversay.speech.C5EngineListFactory
Anyone know if I might be missing somehting? In the above bug I get three Unknown Sources:
at javax.speech.EngineManager.registerEngineListFactory(Unknown Source)
at javax.speech.EngineManager.a(Unknown Source)
at javax.speech.EngineManager.availableEngines(Unknown Source)
This must mean I am missing some classes somewhere. Any help would be greatly appreciated. I am so close. plz help!