3

Image1

As you can see I'm trying to run a Java program but I need the command which I can write in terminal to run the code.

3

I imagine the easiest way would be to press the blue arrow at the top.

If it has to be command line though, try

Javac Main.java

To compile the source to byte code which will give you a Main.class file, then

Java Main

To run it. The oracle website has a quick guide here

  • 1
    Thanks very much it worked well with me, and thanks for the link, it gave me more rich informations. – Mohamed Ali Apr 3 '17 at 1:05
  • @MohamedAli np, the oracle site has a few useful beginners tutorials. – Guy Apr 3 '17 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.