Java Novice Note 1

Source: Internet
Author: User
Hello.java File//class declaration public class hello{    //Declaration method Main program entry public    static void Main (string[] args) {        System.out.println ("Hello world!");}    } Compile command C:\>javac c:\users\administrator\desktop\hello.java//javac  path + file name. java//javac-d d:\  C:\Users\ Administrator\desktop\hello.java//-d Specify the location of the class file//Run command C:\>java-classpath C:\Users\Administrator\Desktop\ hello//format Java-classpath path ' class name (do not extend)//C:\>JAVA-CP C:\Users\Administrator\Desktop\Hello.java

1.cd/d+ path, switch to the folder where Hello.java is located

2.javac Hello.java

3.java Hello

There is an exception: Hello is not found in this class, is Hello

Java Novice Note 1

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.