Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Line number from JPDA/JDI JVM

Reply
Thread Tools

Line number from JPDA/JDI JVM

 
 
neogguy@yahoo.co.uk
Guest
Posts: n/a
 
      02-10-2005
Does anyone know how to get which lines in a peice of code has been
executed.

Lets say I have a programme of 20 lines and only line 10 to 15 have
been executed, is there anyway of finding out those lines from the JVM
with JPDA/JDI or something.

Thanks

 
Reply With Quote
 
 
 
 
toxa26@hotmail.com
Guest
Posts: n/a
 
      02-10-2005
There is. You'll need jdk 1.4, which supports profiling, and a
profiling tool. Google around for java profiling tools. There are
tons of them.

 
Reply With Quote
 
 
 
 
Jamie
Guest
Posts: n/a
 
      02-11-2005
but I'm trying to write a programme that will do that.

lets say I have a programme like this

1 int x=2;
2 int y=3;
3 int z=0;
4 z=x+y;
5 for(int m=0; m<0; m++)
6 {do something;
7 }

I want to write a programme that will give an output of
1
2
3
4

as line 5 to 7 will never run, but 1 to 4 did.

Thanks

J.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OT: Number Nine, Number Nine, Number Nine Frisbee« MCSE 37 09-26-2005 04:06 PM
Read a file line by line with a maximum number of characters per line Hugo Java 10 10-18-2004 11:42 AM
MS JVM and Sun JVM problem Young-Jin Lee Java 3 01-21-2004 04:25 AM
Different behavior for newStringUTF() for Sun JVM and IBM Jvm Lasse Java 1 01-05-2004 07:49 PM
Re: Handling both MS JVM and Sun JVM Kevin Hooke Java 2 09-02-2003 05:31 AM



Advertisments