How to compile and run Java files using the command line

Source: Internet
Author: User

I believe that you are generally using the IDE environment to develop running Java files, but I think you can run Java files in the command line simple, multi-technology does not press the body.

Next, I'll take a look. Compile and run the Java file:

    1. The first step is to start with the next entry program ( Note: Be sure to write the class name in the program as the name of the saved file )
    2. The second step, go to the Java file to save the directory ( Note: You must go to the saved directory, otherwise the operation will be wrong )
    3. The fourth step using Javac Helloworld.java to compile the source program generates a. Class intermediate code
    4. The fifth step is to run the program using Java HelloWorld ( Note that the end of the program after Java does not need to be written. Class)

How to compile and run Java files using the command line

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.