I'm trying to compile and run a program. So I opened an editor (jEdit) and wrote my program in there. I saved it as a .java file and this is my source code (right?). Now, where should I type the order that compiles the file? And the order that runs it?
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
Yes, that's your source code (the .java file). To compile it, you would type "javac source.java" at a command prompt. (In Windows, this means running cmd.exe; on a Mac, Terminal; on Linux, xterm or Konsole or similar.)
Oh, and to run it, you would probably type "java source". I say probably, because there are other things you might need to add to that (i.e. a classpath for other libraries, a package name if your source isn't in the default package, etc.), but "java source" should work.