How to run a Java program under DOS

Source: Internet
Author: User
  1. Open start, run cmd, enter DOS interface.

    Or use the shortcut key win +r, enter cmd, press ENTER to enter the DOS interface

    2. Run Java, and Javac, to detect if the JDK is configured, and if it is not configured, you need to configure the JDK first.

    3. Create a new folder, under Folders, create a new text document to. Java as a file format, select Open with Notepad and open it.

    4. After opening with notepad++, edit the Java source program and save it after editing is complete.

    5. In DOS run Javac drag the desktop Java program to the Javac command and generate the. class file on the desktop. Note: Enter Javac (space) to drag into the Java program file path

    6. Use the command statement to move the current directory, jump to the new folder, run the Java command under DOS, and output the Java program results.

    Enter command cd/d (new file path)

How to run a Java program under DOS

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.