This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Run and Debug, different result?

 
Kevin Li
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Kevin Li
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved it, use
##########################
BufferedReader br;
int i;
...
while((i=br.read())!=-1)
#########################
replace
///////////////////////
BufferedReader br;
...
while(br.ready())
////////////////////////
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic