I. Getting started 1, download and install J2SDK http://java.sun.com/j2se/1.4.1/download.html 2 java vm http://www.java.com/en/index.jsp 3 API http: //java.sun.com/api/index.html 1 First download J2SDK installation A Update Path Environment Variable In order to perform Java commands in any directory (such as Javac, Java, et al.), you need to put Java's bin directory Enter the PATH environment variable. For Windows95 / 98, open the Start menu, select "Run", enter the command sysedit (call the system configuration editor), find the PATH settings in the C: /autoexec.bat window (C: /JDK1.3.1) _01 / bin) For Windows NT and Windows 2000, enter the Start menu, select Set / Control Panel / System. For Windows NT, select the Environment page, for Windows 2000, select "Advanced" page, add in the user variable bar in the environment variable setting (if there is no PATH) or modify the PATH environment variable, make it included in C: / JDK1 .3.1_01 / bin path. B Update ClassPath Environment Variables In order to enable the system to find user-defined classes, you need to place the directory where the user class is located (usually the current directory is added to the classpath) is placed in the ClassPath variable. The specific changes method is used to modify the process, just to find the ClassPath environment variable for modification. Environment variables under JDK Win2000 are set http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7045 C Confirm that the system is installed under the DOS prompt, enter the set command to see if the PATH and CLASSPATH are successful (If you are 98 need to run autoexec.bat to make the modified setup to take effect if you need to turn your DOS to turn off again) 2 Then run your first Java program to write a class saved as .java file must remember if it is used When you save the editor, you should select the save type to all types and file names and your class names or you can use the class .java plus quotation marks to avoid saving to .java.txt type 3 Frequent error handling If you run the javac command, you first look at whether your file is saved as .java.txt type (the expansion name in the right point file) Remember to remember the file name .java Plus quotation marks save. If you run the java command, you will be an exception in THREAD "main" java.lang.noclassdeffounderroe: no added in your classpath. Second, the common error 1 can not read xxx.java first look at whether your file is saved as .java .txt type (the expansion name in the right point file to see the property) Remember to save the file name .java plus quotation marks.
2 Exception in thread "main" java.lang.noclassdeffounderroe: indicating that you have not added in your classpath. Http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7233 3 "==" and "Equals () "Where is the difference? http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=16630&show=0 4 StringBuffer S1 = New StringBuffer ("a"); StringBuffer S2 = New StringBuffer ("a"); s1.equals S2) // Why is false string s1 = new string ("a"); string s2 = new string ("a"); s1.equals (s2) // Why is True http://www.chinajavaworld.net/ Forum / TOPIC.CGI? Forum = 20 & Topic = 14935 string, and stringbuffer difference http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7007 5 Java web start? Http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=15868 6 TRIM () Function Usage http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=10515 7 How to extract the system time? Http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=734 8 How to make the window always at http://www.chinajavaworld.net/forum/topic.cgi?forum = 20 & Topic = 16587 9 Date display formatted http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=16750 Question and lunar calendar? ? ? ? ? ? ? ? ? Http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7101 10 What is the difference between static and non-static nested classes? http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=4721 11 How to judge the input Stuff is a character or a number? http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & Topic = 4687 12 Finalize () and system.gc () Http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=
4656 13 How to enter 2 on the keyboard .... Constly printed 50 ??? system.in.read () usage http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=4605 15 class polymorphism http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=4737 16 If a program contains multiple .java files, and they are related to each other, now to compile them, what to do! Http://www.chinajavaworld.net/forum/topic.cgi?forum=20utopic=5000 17 Interface and Class Discussion http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=5007 18 About How did the Chinese transpare to the code? Http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=4991 19 Can you read Jtextarea's content? http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 4785 20 Two Dates How to add to add http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=4812 21 "this" function and use? Http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=4780 22 About Polymorphism and Multi-level inheritance http://www.chinajavaworld.net/forum/topic.cgi?forum= 20 & Topic = 4772 http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7154 23 What is an object-oriented design idea? Http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7069 24 About a problem with the inner class of Java http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=712 25 How to get this machine's IP http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7151 26 throw and throws What is the difference? http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7005 27 Why is this problem with an abstract class in Java? ? What is his role? What is the advantages? ? What is mean in what is mean when it is called http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=160 28 Final, private defines a variable says? h h1 =
7042 29 Java modifier and character output problem http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7054 30 What is anonymous class? http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7070 31 How to run another executable on the hard disk in an application? Http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7066 32 How to take this date?? I want to get this format: YYYY-MM - DD how to do? ? ? http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7081 33 How to translate into decimal? Http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7079 34 How to generate .jar files? http://www.chinajavaworld.net/forum/topic.cgi?forum=20&topic=7073 35 FINAL Can be inherited to overwrite http://www.chinajavaWorld.Net/forum/topic.cgi?forum=20&topic=25880&show=0