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"
}));