2 Replies Latest reply on Oct 27, 2011 6:21 AM by swimablefish

    use byteman.sh -l failed

    swimablefish Newbie

      Hi, when i use "byteman.sh AppMain3 -l test2.btm", the test2.btm didn't been installed.  bmsubmit.sh showed no rule installed, and then use "bmsubmit.sh -l test2.btm", the rule would be installed successfully.

       

      AppMain3.java

       

            import java.io.DataInputStream;

       

      class AppMain3

      {

          public static void main(String[] args)

          {

              Test1 t = new Test1();

       

       

              try {

                  DataInputStream in = new DataInputStream(System.in);

                  String next = in.readLine();

                  while (next != null && next.length() > 0 && !next.contains("end")) {

                      t.update();

                      final String arg = next;

                      Thread thread = new Thread(arg) {

                          public void run() {

                              System.out.println(arg);

                          }

                      };

                      thread.start();

       

       

                      try {

                          thread.join();

                      } catch (Exception e){

                      }

                      next = in.readLine();

                  }

              } catch (Exception e) {

              }

          }

      }

       

      test2.btm

      RULE update

      CLASS Test1

      METHOD update()

      IF true

      DO traceln("at write 5");

         Thread.sleep(5 * 1000)

      ENDRULE