Rhythmk learn Java step by step (1): Java Development Environment Configuration

Source: Internet
Author: User

1. Download JDK such as: jdk-6u10-rc2-bin-b32-windows-i586-p-12_sep_2008.exe next .. Next, install the SDK.

2. configure system variables:

Right-click "my computer", select "properties", select "advanced", and click "environment variables"

In "system variable (s )"

Create: java_home: C: \ Program Files \ Java \ jdk1.6

New: class_path:.; % java_home % \ Lib

Edit: Path: Add % java_home % \ bin at the beginning;

3. Run the CMD command Java-version to check whether the installation is successful.

4. Download myeclipse. Currently, myeclipse-10.0-offline-installer-windows.exe is installed.

5. After installation is complete, start myeclipse to set the encoding format

Edit-> set encoding for UTF-8

Test environment:

 Package  App1.rhythmk.com;  Import Java. Text. messageformat;  Import  Java. Text. simpledateformat;  Import Java. util .* ;  Public   Class  Firstunit {  /**  * Obtain the system time  */      Public   Static   Void  Main (string [] ARGs) {system. Out. println ( "Hello world! " ); Date time = New  Date (); system. Out. println (time. tostring (); simpledateformat dformat = New Simpledateformat ("yyyy-mm-dd hh: mm: SS" ); System. Out. println (dformat. Format (time ));  //  Obtain the system time table simpledataformat. The default format is yyyy-mm-dd hh: mm: Ss. Simpledateformat dformat2 = New  Simpledateformat (); system. Out. println (dformat. Format (time ));  // String formatting String. Format ("abcdefjhijk", 10, "rhythmk" ); Messageformat msgformat = New Messageformat ("abck--{0}-de-{1}-fck-{0}-ijdkakdkak" ); System. Out. println ( "Format character:" + msgformat. Format ( New  String [] { "Str1" , "Str2" }));}} 

 

Date time = new date ();
System. Out. println (time. tostring ());

Simpledateformat dformat = new simpledateformat ("yyyy-mm-dd hh: mm: SS ");
System. Out. println (dformat. Format (time ));
// Obtain the system time table simpledataformat. The default format is yyyy-mm-dd hh: mm: Ss.
Simpledateformat dformat2 = new simpledateformat ();
System. Out. println (dformat. Format (time ));

// String formatting
String. Format ("abcdefjhijk", 10, "rhythmk ");
Messageformat msgformat = new messageformat ("abck-{0}-de-{1}-fck-{0}-ijdkakdkak ");
System. Out. println ("formatting character:" + msgformat. Format (New String [] {
"Str1 ",
"Str2"
}));

 

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.