Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

Kotoshov

  • 2 years ago

Hi, 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? Thanks

  • This Question is Closed
  1. djaquay
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    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.)

  2. djaquay
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    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.

  3. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.