• Post Reply Bookmark Topic Watch Topic
  • New Topic

How does jrm use the .java file  RSS feed

 
Adam Price
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was tweaking a program last night, and I noticed something that to me was peculiar. My editing was in eclipse, but I was compilling and running from the command line. I would save in eclipse, got to terminal, type "javac MyScript.java" then type "java MysScript"

What I noticed was that if I ran javac, then changed a string in the Myscript.java, saved and then ran java MyScript, then change would be reflected in the output. I didn't expect that at all - I thought that once the .class file was built, it no longer referred to the .java file.

How and when does the jrm refer to the .java file?
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that Eclipse wasn't compiling whenever .java files were saved?
 
Curtis Brown
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess is that you were perhaps up a little too late

I'm unable to replicate this. What is the code in question?
 
Adam Price
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeff Albrechtsen:
Are you sure that Eclipse wasn't compiling whenever .java files were saved?


Ahh - bingo - that's what is happening. I can't find any spots to turn it off, but then again it does save me a step while I am figuring out if my (rudimentary) scripts work

My guess is that you were perhaps up a little too late

I'm unable to replicate this. What is the code in question?


I take it from the tone of disbelief/surprise in y'alls responses that the answer to my original question (How does jrm use the .java file?) is "Not at All." That so?
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is jrm? Do you mean the jvm? If so then the answer "not at all" is correct.

Layne
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!