Write a simple Java program with Notepad

Source: Internet
Author: User



Write a simple Java program with Notepad



The first step:
Install the JDK, and set the environment variables in place.
Desktop-Computer (right-click)-Properties-Advanced system settings-environment variable-path-after variable value, and JDK installation path Plus (path is C:\Program files\java\jdk1.8.0_20\bin;);
Step Two:
Create a new Notepad on the desktop-change the suffix name to Java (Test.java)-Edit (right-click)-Enter the following code:





public class Test {public static void main (String [] args) {
         System.out.print ("I want to become a god");
     }
} 


Step Three:
Switch paths to the desktop (CD C:\Users\pc\Desktop) in the DOS interface



Fourth Step:
Input Javac Test.java//compile, the desktop will generate a Test.class file after compiling
Enter Java Test//Run
The results are as follows:
650) this.width=650; "src=" http://img.blog.csdn.net/20150721035744088 "alt=" here write a picture describing "title=" "/>






This article is from the "Sanghaidan blog column" blog, please be sure to keep this source http://10602803.blog.51cto.com/10592803/1683050



Write a simple Java program with Notepad


Related Article

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.