Java First Program (CMD environment)

Source: Internet
Author: User

After the newly-learned Java is configured with the JDK, it is an error to run the first Java program with the cmd command as an example. That is true:

1, in a certain disk (preferably English path), new Notepad input Java program, for example:



Save As Hellojava.java. 2. Computer Start-run (or win+r) input cmd, enter, open the program location. Enter Javac Hellojava.java. If something goes wrong,

3. This is because even if saved in. java format, it is also a. txt format, at this point: click on Computer (My Computer)-upper left corner Click Organization-View, advanced settings-unhide the file suffix name. then just the Notepad program, the. txt suffix appears, delete the suffix name, the program becomes. java suffix.

4. Javac Hellojava.java return again, enter Java Hellojava the second line

The problem is solved.

Java First Program (CMD environment)

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.