aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Run and Debug, different result? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Run and Debug, different result?" Watch "Run and Debug, different result?" New topic
Author

Run and Debug, different result?

Kevin Li
Greenhorn

Joined: Sep 25, 2001
Posts: 21
I have a program analysis website,
but there is a trouble, when I execute
it by run and debug menu from JBuilder5,
their result are different.
pls help me.
Kevin Li
Greenhorn

Joined: Sep 25, 2001
Posts: 21
these are parameters for run and debug:
javaw -classpath "..." test.CollectionScheduler
javaw -classic -classpath "..." -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,address=javadebug,suspend=y test.CollectionScheduler
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
One possibility is that you are using a different VM for execution and debugging, and your analyis program is dependant on the behavior of something in the VM environment for its operation. Also, perhaps the same VM is being used, but the start-up options/flags are such that again, there is an affect on something your program is depending on.
Also, the addition of the debugger access could just be highlighting an existing problem with your code, such as a race condition, that isn't showing up when you run without the debugger.


Rob
SCJP 1.4
Kevin Li
Greenhorn

Joined: Sep 25, 2001
Posts: 21
I solved it, use
##########################
BufferedReader br;
int i;
...
while((i=br.read())!=-1)
#########################
replace
///////////////////////
BufferedReader br;
...
while(br.ready())
////////////////////////
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Run and Debug, different result?