bom dia...

eu j� havia olhado este link... obrigado!
Mas n�o funciona...
Abaixo a classe que estou usando para testar.
Para executar: java -Ddebug=true Test

public class Test{


        public static void mycode()
        {
                        int a, b, c;
                        a = 10;
                        b = 20;
                        c = a + b;

        }

        public static void main(String[] args) {

          boolean debugmode=false;

          String dprop=System.getProperty("debug");

          if ((dprop !=null) && (dprop.equals("yes"))){
                debugmode=true;
          }

          if (debugmode) {
           System.err.println("debug mode!");
          }

        Runtime.getRuntime().traceInstructions(true);
        mycode();
        Runtime.getRuntime().traceInstructions(false);

        System.out.print("end");
 }

}

Quoting Marcelo Leite <[EMAIL PROTECTED]>:

>
> Bom dia Eduardo...
> Segue abaixo um link da Sun que pode te ajudar com este assunto:
>
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/collect.html#debug
>
> ________________________________
> []'s
> Marcelo Leite
>
>
> >From: [EMAIL PROTECTED]
> >Reply-To: [EMAIL PROTECTED]
> >To: [EMAIL PROTECTED]
> >Subject: [JUG-Petro] java -debug e traceInstructions
> >Date: Wed, 27 Oct 2004 22:29:47 -0200
> >
> >Oi pessoal,
> >
> >alguem sabe como usar a op��o -debug da m�quina Java?
> >
> >Estou querendo colher informa��es din�micas durante a execu��o de
> >aplica��es
> >atrav�s do uso do m�todo Runtime.getRuntime().traceInstructions(true), mas
> >n�o
> >acontece nada...
> >
> >Eu estou usando j2sdk1.4.2
> >
> >Obrigado,
> >Eduardo.
> >
> >
> >
> >
> >----------------------------------------------------------------
> >This message was sent using IMP, the Internet Messaging Program.
>
> _________________________________________________________________
> MSN Messenger: converse com os seus amigos online.
> http://messenger.msn.com.br
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/5cFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/jug-petropolis/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Atrašyti