JSAPI : Problems with the speech recognition HelloWorld example

I just started off with JSAPI. And I immediately ran into problems. These are the configurations and the stuff I did:
My system:
OS: WinXP
JDK: JDK 6 Update 10
IDE: Netbeans 6.0
I downloaded the FreeTTS.zip from the FreeTTS site [http://freetts.sourceforge.net/docs/index.php] . I expanded it and in the lib folder I ran the jsapi.exe and as a result jsapi.jar war generated.
I included this jar in my project lib as jar.
Then I copy pasted HelloWorld speech recognition example code given in the site : [http://java.sun.com/products/java-media/speech/forDevelopers/jsapi-guide/Recognition.html#11644]
First it gave a compile time error that
rec.deallocate();throws an exception which needs to be handled. Accordingly I surrounded it with a try catch block and caught the exceptions in the manner given below:
   try{
         rec.deallocate();
                    System.exit(0);
                } catch (EngineException ex) {
                    Logger.getLogger(HelloWorld.class.getName()).log(Level.SEVERE, null, ex);
                } catch (EngineStateError ex) {
                    Logger.getLogger(HelloWorld.class.getName()).log(Level.SEVERE, null, ex);
Now the code was compiling without problems.
When I executed the code a runtime exception (NullPointerException) was thrown at the line
      rec.allocate();  in the psvm(String args[])
Can anybody please explain to me where I am going wrong? Or is there something more that needs to be added in the code?
Anxiously waiting to hear from your end.
Thanks and regards,

Hi All,
I am using following code
import javax.speech.*;
import javax.speech.synthesis.*;
import java.util.Locale;
public class HelloWorld {
     public static void main(String args[]) {
          try {
               // Create a synthesizer for English
               Synthesizer synth = Central.createSynthesizer(
                    new SynthesizerModeDesc(Locale.ENGLISH));
                           synth.waitEngineState(Synthesizer.ALLOCATED);
               //Synthesizer synth = Central.createSynthesizer (null);
               // Get it ready to speak
               synth.allocate();
               synth.resume();
               // Speak the "Hello world" string
               synth.speakPlainText("Hello, world!", null);
               // Wait till speaking is done
               synth.waitEngineState(Synthesizer.QUEUE_EMPTY);
               // Clean up
               synth.deallocate();
          } catch (Exception e) {
               e.printStackTrace();
}and i am also getting following error
java.lang.NullPointerException
        at HelloWorld.main(HelloWorld.java:18)My class path is set to
jsapi.jar (extracted from freetts 1.2.1)
freetts.jar
Please i didn't find any solution from past replies so please do help me someone to solve this...
Thanking You....

Similar Messages

  • HELLO, I HAVE THE SNOW OF LEOAPARD 10.6.8, I WOULD LIKE TO UPDATE THE LAST LION. I WOULD LIKE TO KNOW IF THERE ARE PROBLEMS WITH THE SOFTWARE COMPATIBILITY NOW, EXAMPLES: LOGIC, REASON, SUITE ADOBE CS5 ... THANK YOU

    HELLO, I HAVE THE SNOW LEOAPARD 10.6.8, I WOULD LIKE TO UPDATE THE LAST LION. I WOULD LIKE TO KNOW IF THERE ARE PROBLEMS WITH THE SOFTWARE COMPATIBILITY NOW, (EXAMPLES: LOGIC, REASON, SUITE ADOBE CS5 ...) THANK YOU!

    Have a look here:
    http://applehelpwriter.com/2011/07/24/will-my-old-apps-work-with-lion/
    (Like any website owner, I may (or may not) derive compensation from my website)

  • Problem with the volume keys on my keyboard.

    Hey everybody,
    I have a problem with the volume keys on my keyboard. This started a couple days ago and I can't seem to figure out how to fix it. When I press the volume up or down buttons, the graphic appears on the screen as it normally would, but has no effect on the volume of the sound coming out of my speakers.  Therefore, the only way to change the volume of music or whatever I am listening to is to use the volume control within the program/website itself (itunes, youtube, etc.) Even changing the volume on the volume icon at the menu bar on top of the screen does nothing.  If anyone has an idea of how to go about solving this issue, I would greatly appreciate it. Thanks!

    First look into the Preference > Sound > Outpur whether internal Speakers are choosen.
    The only Preference to delete I can discover is com.apple.systempreferences.plist in your home Library folder. You can try to move it out to the desktop for example, not to loose all your settings. Restart and see whether the problem still persists. If you don't know how to do this here some Terminal (Applications > Utilities) commands. Enter them by copy and paste followed by <enter>
    mv ~/Library/Preferences/com.apple.systempreferences.plist ~/Desktop/
    restart
    to get it back:
    mv ~/Desktop/com.apple.systempreferences.plist  ~/Library/Preferences/
    confirm with "y" if you are asked to replace this file.
    marek

  • Problem with the FOR statement.....again!

    Hi everyone,
    Well I'm still trying to do a car slideshow using external
    files and can't seem to see the end. The current movie is here:
    http://www.virtuallglab.com/projects.html
    I also attach the code. My problem is I had originally set up
    an animation with 2 pictures sliding in with some text, and then
    wait 4 seconds before sliding out, and then next pictures and text
    would slide in and so on, using a setInterval.
    The problem is the FOR loop seems to skip the setInterval and
    the function "wait", so it just loops quickly and jumps to last
    picture, so on the example above, it just slides the last picture
    (i=9) and that's it!
    Can you not include another function within a FOR statement.
    Or is there a way to tell the FOR loop to wait until all motion is
    finished?
    Any help greatly appreciated
    import mx.transitions.*;
    import mx.transitions.easing.*;
    for (i=0; i<10 ; i++) {
    var picLeft = "pics/"+i+".jpg";
    var picRight = "pics/"+i+"b.jpg";
    var txtToLoad = "text/"+i+".txt";
    this.createEmptyMovieClip("leftHolder",1);
    leftHolder.loadMovie(picLeft,i,leftHolder.getNextHighestDepth());
    leftHolder._x = -200;
    leftHolder._y = 15;
    var leftTween:Tween = new Tween(leftHolder, "_x",
    Strong.easeOut, leftHolder._x, 10, 2, true);
    this.createEmptyMovieClip("centerHolder",2);
    centerHolder.loadMovie(picRight,i+"b",centerHolder.getNextHighestDepth());
    centerHolder._x = 180;
    centerHolder._y = 250;
    var centerTween:Tween = new Tween(centerHolder, "_y",
    Strong.easeOut, centerHolder._y, 15, 2, true);
    text._x = 600;
    myData = new LoadVars();
    myData.onLoad = function(){
    text.carText.text = this.content;
    myData.load(txtToLoad);
    var textTween:Tween = new Tween(text, "_x", Strong.easeOut,
    text._x, 420, 2, true);
    myInterval = setInterval(wait, 4000);
    function wait() {
    var leftTweenFinished:Tween = new Tween(leftHolder, "_x",
    Strong.easeOut, leftHolder._x, -200, 1, true);
    var centerTween:Tween = new Tween(centerHolder, "_y",
    Strong.easeOut, centerHolder._y, 250, 1, true);
    var textTween2:Tween = new Tween(text, "_x", Strong.easeOut,
    text._x, 600, 1, true);
    clearInterval(myInterval);
    ***************************************************************************************** ***

    There is no way to tell a for loop to wait. That is not what
    they do.
    The entire for loop will execute (if possible, and it doesn't
    enter some kind of continuous infinite loop) completely before each
    time the frame is rendered.
    If you want to spread things out over time you need to use
    the setInterval -- but not inside a for loop! If you do that you
    immediately set however many intervals as your loop has. In this
    case you will also assign the ids for those intervals to the same
    variable, effectively overwriting the value so you will never be
    able to clear most of those intervals.
    So you need to rethink you whole structure. Set up some kind
    of counter and limit like this:
    var slidesToShow:Number=10;
    var curSlide:Number=0;
    Then have your setInterval increment the curSlide each time
    it is called and check to see if it has shown all of them. That is
    where your "loop" comes in.
    As for the other part of your question -- yes you actually
    have two different issues going on -- again you cannot make a for
    loop wait for anything. So no there is no way to pause it while you
    wait for your tween to end. But you can be notified when a tween
    ends.
    Check out the documentation about the tween class in the help
    files. There you will find the onMotionFinished event. So you can
    set up one of those to start whatever needs to be started when the
    tween has finished.
    You should also use the MovieClipLoader class to load your
    images, because you have no idea how long it will take to load
    them. Using that class you get a nice event (onLoadInit) that tells
    you when the asset is ready to be used.
    Finally I'm thinking you might want to use setTimeout instead
    of setInterval. It only goes once, while setInterval repeats
    forever. So I would think your algorithm would be something like
    this.
    1. load external asset
    2. when ready animate in and set onMotionFinished handler
    3. when motion is finished start loading next asset and
    setTimeout for 4 seconds.
    4. when 4 seconds is up or the clip is loaded (which ever
    takes longer) go to 2 and repeat.
    If this is going to be run locally on a hard drive or CD you
    won't have any problem with the length of time it takes to load the
    external assets, but if it is over the web it will take time.

  • I am having a strange problem with the awesome bar

    The awesome bar/location bar is no longer as awesome as it used to be. When I start typing in an address it seems like it no longer checks through my history and gives a list of possible matches but just gives the stem of an address. For example, if I type in 'goo' it will complete this to 'google.com' if I then append this with an '/a' it will complete this to 'google.com/analytics' but that's as good as it gets, as I say, no list from the history or bookmarks.
    I've checked the options and also about:config and all the settings are as they should be, as far as I can tell (and I certainly hadn't changed any of them when it started misbehaving). I've also disabled all extensions and plug-ins.
    It's driving my slightly bonkers because I quite often use sites with long addresses and can't remember each of the components of each address. I'd switch to using Chrome but I also use Firebug a fair bit so don't really want to do this.

    Hi cowtan, <br/>Sorry you are having problems with the awesome bar.
    I imagine the new behaviour may be reversed by changing some pref but I have not looked that up.
    Regardless of the new behaviour you seem to have some fault as my awesomebar still gives bookmarked items.
    As a troubleshooting step try adding an asterisk in the awesomebar (as first character or anywhere) that should then filter the results in the dropdown list to bookmarked only items, does that work ?
    * see [[Search your bookmarks, history and tabs with the Awesome Bar#w_changing-results-on-the-fly]]_changing-results-on-the-fly
    You possibly have some extension interfering with the awesome bar, try Firefox in safe mode (but do NOT* at this stage try the Reset Firefox option)
    <nowiki>*</nowiki>'''edit''' - personal opinion, if a user; such as you; is knowledgeable enough to use ''about.config'' the easy solution of ''FirefoxReset ''is probably not the best route, as it can have unwanted side effects that are avoidable.
    * [[Troubleshoot Firefox issues using Safe Mode]]
    Do your bookmarked items appear in safe mode ?
    <u>Try a new Profile.</u><br/>The best method for troubleshooting this will be to set up a new Firefox profile, you can then: experiment, troubleshoot, alter settings or extensions installed in that profile without changing and potentially damaging your current profile.
    * http://kb.mozillazine.org/Profile_Manager#Creating_a_new_profile
    I suggest to prevent unexpected problems you
    * use a sensible name such as test 2012 for the profile name
    * ensure an empty folder is used & do not then rename or delete the new profile (instead add or delete shortcuts to it)
    * also see http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • Problem with the calculator and modifications needed

    i have got a problem with the calculator on my iphone i.e i cannot find any DEL key or Backspace....the problem is when typing a long value if one number is entered wrong we should start again.
    EXAMPLE...if i need to type    114678047 * 345612
    if acidentally if i type 114678047 * 3455           ( then i should start over typing  "C"  key)
    i should start over to type the whole data..if we have a delete key we can just correct it right away and continue.....rather than starting over
    we can find this feature in all the other smart phones , i dont know why apple coudnt find that
    even every scientific calculator have a DEL key...
    Thanks
    vickyk7

    FEEDBACK
    If you want to give Apple feed back then do it here http://www.apple.com/feedback/iphone.html

  • Windows 7 Home Premium with 802.1x problems with the Authentication

    We have problems with  OS Windows 7 Home Premium 802.1x, the message in ACS:
    EAP-TLS or PEAP authentication failed during SSL handshake
    ACS v4.1
    We have OS Windows 7 Professional and doesn´t have problems with the authentication.
    I hope that you can help me
    Regards

    We were investigated with specialist people of OS Windows and the conclusion was that the Home Premium Version has restrictions about authentication and domain (Active Directory). So we need change the version of OS (Proffessional for example).
    If you had another tip, please tell me and I try it for resolve this issue, if not we have to change the OS.
    Regards

  • Problem with the creation of the _pageflow folder in the portal project

    Hi,
    I have developed one portal project on the BEA Weblogic Portal server version 9.2. And I am having a quite a number of pageflow portlets in my application.I am facing a weird problem with the workshop(BEA Workshop for Weblogic Platform 9.2.1). It is not generating the folder _pageflow required for all the protlets when we build it.I tried cleaning and building it number of times but it is of no use.
    Is it a bug in the weblogic server version or do I really miss something in the workshop settings?
    Please help.
    Thanks & Regards
    Prakash.

    Hi Dmitry,
    What state are the tasks in?  Are they in Active, Running, or Completed?  There will only be output files if the tasks are in state running or completed.
    Additionally, what is the status of the pool which the tasks ran on?  If the pool VMs have been deallocated (or the pool itself has been deleted) then the task files will be lost.  This is because the files of the tasks reside on the VM which ran
    the task.
    Lastly, you can check the file retention time of the tasks in the BatchExplorer UI by selecting the task and looking in the "Task Details" tab for "TaskConstriants.RetentionTime" to see what that is set to - if the retention time has
    passed (i.e. retention time was 1h but the task was run 2h ago), then the files will be cleaned up.
    It sounds like you already are using BatchExplorer, but we recently published a blog post which has some specific instructions for using BatchExplorer to debug (how to RDP into a VM for example), which you can find
    here - it also has some code snippets for how BatchExplorer performs the operations that it does.
    Let us know what you find from your investigation and we can help you figure out why your tasks don't have output files.

  • I got my iphone 5 3 weeks ago and the battery life is very short. It drains out very fast. Does anyone know if it's a problem with the iOS or with my phone? Because I'm a bit concerned

    I recieved my iPhone 5 3 weeks ago and the battery life completely *****! After doing a few things and maybe using it for about 30 minutes the phone start overheating like crazy then the battery starts dropping very fast. Does anyone know if it's a problem with the iOS or with my phone? And is anyone else expierenceing these problems?

    It sounds like you have an app that is incorrectly continuously using data and power... from normal use the phone should NOT be getting that warm... only constant video playing via data like Netflix for example would result in that...
    I'd say that you should remove all apps in the recent app tray... tunr phone off... then once you power back on...
    Hold BOTH home and sleep wake buttons together until you see a white apple symbol... then release both buttons...
    This will ensure you have no apps running...
    I've experienced a hang up with mail while out and about that has resulted in this on my iPhone as well... Once I performed these steps it was fixed... it seemed like it got stuck and that's what caused the warm phone and battery drain...
    I notived that when it gets stuck (mail app that is) I will see the text connecting at the bottom and it never changes to "updated" like it should... this is my trigger that it's gotten stuck.
    Have not really figured out what causes mail app to get stuck yet...

  • Problems with the new NAT in ASA 5510 (8.4)

    Hi together,
    i have some problems with the NAT statements in ASA Version 8.4.
    What i want is to translate the internal address of a server to the external address with a NAT rule.
    The ASA has only one WAN connection (named outside)
    The internal server has the ip address 192.168.0.221 (as example) and i want to translate all incoming traffic on port 3389 to the Server (192.168.0.221).
    This is only for training, i dont want to forward a 3389 port into the BAD in a productive Network
    first i create the network object for the inside server (192.168.0.221)
    object network Network_Obj_RDP
    host 192.168.0.221
    After that i create the access rule for incoming traffic on outside interface:
    access-list outside_access_in extended permit ip any any log debugging
    Next i create a access rule for the inside-prod network to allow the traffic to the RDP Server:
    access-list inside-prod_access_in extended permit object RDP interface outside object Network_Obj_RDP
    Now i create the NAT rule in the network object (Network_Obj_RDP):  
    object network Network_Obj_RDP
    nat (inside-prod,outside) static interface service tcp 3389 3389
    But if i want to connect via 3389 on the outside interface i see in the syslog this entry:
    Built inbound TCP connection 23248 for outside:80.187.107.132/7445 (80.187.107.132/7445) to inside-prod:192.168.0.221/3389 (External IP/3389)
    After a while the connection will be teardown with this message:
    Teardown TCP connection 23289 for outside:80.187.107.132/2294 to inside-prod:192.168.0.221/3389 duration 0:00:30 bytes 0 SYN Timeout
    It looks like that the acl works fine, but the NAT translation are wrong...
    perhaps somebody has a idea to fix this
    Looking forward and hope for help...
    Many thanks
    Greetings

    Hi Jouni,
    this is the correct Packet Tracer output i think:
    packet-tracer input inside-prod tcp 192.168.0.220 3389 8.8.8.8 4567
    Phase: 1
    Type: ACCESS-LIST
    Subtype:
    Result: ALLOW
    Config:
    Implicit Rule
    Additional Information:
    MAC Access list
    Phase: 2
    Type: ROUTE-LOOKUP
    Subtype: input
    Result: ALLOW
    Config:
    Additional Information:
    in   0.0.0.0         0.0.0.0         outside
    Phase: 3
    Type: ACCESS-LIST
    Subtype: log
    Result: ALLOW
    Config:
    access-group inside-prod_access_in in interface inside-prod
    access-list inside-prod_access_in extended permit ip object Network_Obj-Productiv any log debugging
    Additional Information:
    Phase: 4
    Type: IP-OPTIONS
    Subtype:
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 5
    Type: NAT
    Subtype:
    Result: ALLOW
    Config:
    object network Network_Obj_RDP
    nat (inside-prod,outside) static interface service tcp 3389 3389
    Additional Information:
    Static translate 192.168.0.220/3389 to 80.146.252.162/3389
    Phase: 6
    Type: USER-STATISTICS
    Subtype: user-statistics
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 7
    Type: IP-OPTIONS
    Subtype:
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 8
    Type: USER-STATISTICS
    Subtype: user-statistics
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 9
    Type: FLOW-CREATION
    Subtype:
    Result: ALLOW
    Config:
    Additional Information:
    New flow created with id 825, packet dispatched to next module
    Result:      
    input-interface: inside-prod
    input-status: up
    input-line-status: up
    output-interface: outside
    output-status: up
    output-line-status: up
    Action: allow
    That looks preety fine, but the way back isn´t right:
    packet-tracer input outside tcp 8.8.8.8 4567 192.168.0.220 3389
    Phase: 1
    Type: ROUTE-LOOKUP
    Subtype: input
    Result: ALLOW
    Config:
    Additional Information:
    in   192.168.0.0     255.255.255.0   inside-prod
    Phase: 2
    Type: ROUTE-LOOKUP
    Subtype: input
    Result: ALLOW
    Config:
    Additional Information:
    in   0.0.0.0         0.0.0.0         outside
    Phase: 3
    Type: ACCESS-LIST
    Subtype: log
    Result: ALLOW
    Config:
    access-group outside-in in interface outside
    access-list outside-in extended permit tcp any object Network_Obj_RDP eq 3389 log debugging
    Additional Information:
    Phase: 4
    Type: IP-OPTIONS
    Subtype:
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 5
    Type: VPN
    Subtype: ipsec-tunnel-flow
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 6
    Type: NAT
    Subtype: rpf-check
    Result: DROP
    Config:
    object network Network_Obj_RDP
    nat (inside-prod,outside) static interface service tcp 3389 3389
    Additional Information:
    Result:      
    input-interface: outside
    input-status: up
    input-line-status: up
    output-interface: inside-prod
    output-status: up
    output-line-status: up
    Action: drop
    Drop-reason: (acl-drop) Flow is denied by configured rule
    I have no idea...

  • URGENT!!! Problems with the last version  14.2.1

    Hello, I have a problem with the latest update of PS CC two iMac in the company where I work, is that updated to the latest version and have recurring problems, for example, when using the Transform an object tool, the object changes, shown with noise or change the opacity and you can not edit, or also adding some other effect is the result: a distorted image. I think that's the latest update of PS because I have no such problems, because even I do not upgrade to version 14.2.1. Please I need your help, as our work at the agency is compromised with the delays that this causes us. Greetings and thanks! I'll be waiting for an answer.

    Lo siento mucho, aquí va el problema en español:
    Buenos días, tengo un problema con la última actualización de PS CC en dos iMac en la empresa donde trabajo, resulta que actualizaron a la última versión y tienen problemas recurrentes, por ejemplo: al utilizar la herramienta Transformar en un objeto, éste objeto cambia, se muestra con ruido o cambia la opacidad y no es posible editarlo, o también agregando algún efecto el resultado es otro: una imagen distorsionada. Creo que es por la última actualización de PS ya que yo no tengo esos problemas, porque aún no actualizo a la versión 14.2.1. Por favor necesito su ayuda, ya que nuestro trabajo en la agencia se ve comprometido con los retrasos que esto nos ocasiona. Saludos y gracias! Estaré a la espera de una respuesta.
    Muchas gracias!!!

  • Numerous problems with the Adobe AIR runtime for Android

    I created a app on the platform Adobe AIR for Android, which requires for AIR. The app is very popular in the Android Market, but many users complain of problems with the installation of Adobe Air runtime.
    For example these phones users: LGE LG-P698, LG Pecan, HTC Wildfire. But judging by the fact that users have access to the installation of Air, their phones are compatible with it.
    Tell me how do I solve the problem?
    In addition, I have a few questions:
    1. Decides whether the problem of export application with embedded AIR runtime?
    2. I build my apps with the help of ADT. How in this case to make embeding AIR runtime?
    3. Is it possible to prompt the user to download and install older versions of AIR? Where to find its?
    I hope to help, because the problem is global.

    Hi Astraport,
    I think you should embed the air runtime in your application,
    Some time ago I've written a step by step guide, have a look at this post:
    http://forums.adobe.com/message/3961579#3961579
    I hope it helps

  • Problem with the XML in Word 2007 (Word Template)

    Hi Experts,
    i am new on CRM 2007 and i have a problem with the XML Structure of the Word Template.
    First i built a Web Service Design Tool. Then i saw on the Testpage, that it works.
    So i started the Document Templates and created a new Template. Object Type was BUS2000126 - CRM Business Activity. Web Service was my created and tested Web Service Tool.
    As i opened the Word 2007 with the XML-Structure, i recognized, that there was something wrong.
    The Responce on my Testpage from the Web Service Tool had the following structure:
    response (test.types.p1.CrmostZlaWord5ReadResponse)
       Output (test.types.p1.CrmostZla010RoszlaWord5001)
            ZlaWord5 (test.types.p1.CrmostZla010Rosbtorder)
                Administrativeheaderoforder (test.types.p1.CrmostZla010Rosbtorderhea001)
                     Partiesinvolvedofheader (test.types.p1.CrmostZla010Rosbtheaderpa001)
                         Allpartiesinvolved (test.types.p1.CrmostZla010Rosbtpartnera002[]) Displaying 3 elements of 3
                              element1 (test.types.p1.CrmostZla010Rosbtpartnera002)
                                   Btpartneraddress (test.types.p1.CrmostZla010Rosbtpartnera001)
    My Problem is now, that the XML-Structure got not that point "element1".
    Instead of "element1" there is the point "item" in my XML-Structure in Word 2007.
    I guess that is the Problem why i am not getting the fields of the Btpartneraddress filled in my Word.
    Can anyone help me? Or put me in the right direction that i can change the XML?
    Thanks for your help
    André

    Hi andré, I guess the issue is coming from the fact that you selected "AllPartiesInvolved" and that may contain any numbers of entries. So when you test your webservice, you put a key and then get a result for that key, and in that case you might get "element1" until "element3" for example if there was 3 partners involved in you activity.
    But, when you design your template, you don't have a key at that moment, so in the Web Service structure, you have "items" which stands for all the possible entries you might retrieve at runtime. I guess you could use an index in your template to specify which item you need, but this is quite hasardeous, so i would be you, I would not design my web service to use "AllPartiesInvolved" but rather a specific Partner type like contact person for instance.
    Regards,
    Xavier

  • Error thread java : problem with the function "resume 0x***"  (forum sun)

    One problem with the function of jdb occured when I tried to use it to
    pilot the processor with differents threads. In fact, I use a simple example with 2 threads.
    I stop the two threads with two breakpoint, and I want to resume one or the other (with the function "resume 0x****"), the one wich I resumed stop again on the breackpoint and I decide again to resume one or the other. All of that to obtain a tree of execution.
    I give you the code of the class and the code of jdb.
    CLASS: (it's just a object Room with a variable degre that I increment and decrement with two threads increase and decrease)
    public class Test{
         public static void main(String[] args){
              Room r = new Room();
              decrease de = new decrease(r);
              increase in = new increase(r);
              de.start();
              in.start();
    class Room {
         private volatile int degre=20;
         public void more(){
         degre += 4;
         public void less(){      
         degre -= 3;
    class decrease extends Thread{
    private Room room;
    public decrease(Room r){
              room =r;
    public void run(){
    try{ 
         while (!interrupted()){ 
              room.less();
    catch(InterruptedException e) {}
    class increase extends Thread{
    private Room room;
    public increase(Room r){
         room =r;
    public void run(){ 
         try{ 
              while (!interrupted()){
                   room.more();
    catch(InterruptedException e) {}
    JDB:
    Initializing jdb ...
    stop at Test:7Deferring breakpoint Test:7.
    It will be set after the class is loaded.
    runrun Test
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Test:7
    Breakpoint hit: "thread=main", Test.main(), line=7 bci=30
    7 in.start();
    main[1] stop at room:16
    Set breakpoint room:16
    main[1] stop at room:20
    Set breakpoint room:20
    main[1] resume
    All threads resumed.
    >
    Breakpoint hit: "thread=Thread-0", room.less(), line=20 bci=0
    20 degre -= 3;
    Thread-0[1] threads
    Group system:
    (java.lang.ref.Reference$ReferenceHandler)0x10d Reference Handler cond. waiting
    (java.lang.ref.Finalizer$FinalizerThread)0x10c Finalizer cond. waiting
    (java.lang.Thread)0x10b Signal Dispatcher running
    Group main:
    (decrease)0x146 Thread-0 running (at breakpoint)
    (increase)0x147 Thread-1 running (at breakpoint)
    (java.lang.Thread)0x148 DestroyJavaVM running
    Thread-0[1] resume 0x147
    Thread-0[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] resume 0x147
    Thread-1[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] print degre
    degre = 24
    Thread-1[1] resume 0x146 //It's here the problem, thread 0x146 have to stop on the //next breakpoint of decrease but nothing happen
    Thread-1[1] resume 0x147
    Thread-1[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] clear
    Breakpoints set:
    breakpoint Test:7
    breakpoint room:16
    breakpoint room:20
    PS: I tried many other examples with other class and other kind of breakpoints, but, in any cases, on thread doesn't manage to resume. When I try with general resume (no specification of the thread), It works but it isn't interresting for me because I want to decide wich thread continue his execution.

    Hi,
    I have read the FAQ of the JMF.
    The problem was the jar files of the JMF were not in the JRE\BIN\EXT
    folder of the Java runtime!
    now it works!
    thanks
    Reg

  • Problem with the JFileChooser

    Hello all,
    I'm having a small problem with the JFileChooser, the thing is whenever I click the cancel button in the dialog box a NullPointerException is thrown, so does anyone know wut is wrong?

    Either way, it's an extremely important skill to learn to read the API and become familiar with the tools you will use to program Java. Java has an extensive set of documentation that you can even download for your convenience. These "javadocs" are indexed and categorized so you can quickly look up any class or method. Take the time to consult this resource whenever you have a question - you'll find they typically contain very detailed descriptions and possibly some code examples.
    Java� API Specifications
    Java� 1.5 JDK Javadocs
    Best of luck!
    ~

Maybe you are looking for

  • Connection does not work after update of PC Suite

    I recently bought a 6070 phone. I had no problem of connecting this to my computer (XP Home SP 2) for 6.81.13.0, using cable CA-42. But then I got the mad idea to look for an update and installed 6.84.10.3 (should work for 6070 according to what they

  • What's New in Adobe Proto 1.5 | Adobe Touch Apps | Adobe TV

    Worldwide Web Evangelist, Paul Trani reviews the top new features in the 1.5 release of Adobe Proto see how you can Email your interactive wireframes (html.zip) as an attachment. Share interactive wireframes via Dropbox and other Apps, Paste and Pin

  • ERROR in SE38 Standard Program

    Dear All, I am facing one strange problem with ABAP EDITOR. Our Basis team have done some note applying in Development Client. There was lot of notes, all in one request. It is been transported to Quality. There i think they got one Error. Now the pr

  • Doubts in JMS Sender adapter configuration (SonicMQ JMS Provider)

    Hi All, I am doing a TIBCO--> XI integration using JMS sender adapter. Adapter status is as follows.. <b>"Sender channel. Details: (No detail information set.)"</b>. XML Msg in TIBCO-ems queue which JMS adapter access is as follows..... <?xml version

  • Apple need to have a support forum in Chinese language

    many Chinese Apple users has problems unsolvable in any Chinese apple enthuaist forums and they don't speak English so they cannot get help from the rest of the world.