I. Getting Started
1. Download and install j2sdk http://java.sun.com/j2se/1.4.1/download.html
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 the PATH environment variable. In order to execute Java commands (such as javac, Java, and so on) in any directory, you need to put the Java bin directory into the path environment variable. For Windows 95/98, open the "Start" menu, select "run", enter the command sysedit (call the System Configuration Editor), and go to C:/autoexec. find the path setting in the bat window and append an item (C:/jdk1.3.1 _ 01/bin). For Windows NT and Windows 2000, go to the Start Menu, select "Settings/control panel/system ". For Windows NT, select the "Environment" Page. For Windows 2000, select the "advanced" Page and add it to the user variable column in environment variable settings (if no path exists) or modify the PATH environment variable to include the C:/jdk1.3.1 _ 01/bin path.
B. Update the classpath environment variable. In order to enable the system to find the user-defined class, you need to put the directory where the user class is located (usually the current directory adds. To classpath) into the classpath variable. The specific modification method is the same as the path modification process. You only need to find the classpath environment variable and modify it. JDK Win2000 environment variables set http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 7045
C. Check that the system is installed at the DOS prompt. Enter the SET command to check whether the settings of path and classpath are successful (if 98 users need to run autoexec. BAT can make the modified settings take effect. If it is 2000, DOS should be disabled and re-run)
2. Then run your first Java program to write a class and save it. for java files, remember that if you use the notepad editor to save the files, you must select the Save type as all types. Then, the file name and your class name must be the same. You can also add the class name. Java to avoid saving the file as the. java.txt type.
3. common error handling: if the "can not read XXX" error occurs when running the javac command. java first, check that your file is saved as the. java.txt type (right-click the file to see the extension name in the property) and save it again. Remember to save the file name. java is enclosed in quotation marks. If exception in thread "Main" Java. Lang. noclassdeffounderroe: Is prompted when running the Java command, it indicates that your classpath is not added.
Ii. Common Errors
1 can not read XXX. Java first check that your file is saved as the type of .java.txt (the extension name in the property is displayed on the right). Remember to save the file name. Java with quotation marks.
2 exception in thread "Main" Java. Lang. noclassdeffounderroe: Does your classpath contain. http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 7233
3 "=" and "equals ()" what 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 it false string S1 = new string ("A"); string S2 = new string ("A"); s1.equals (S2) // Why is the http://www.chinajavaworld.net/forum/topic.cgi true? Forum = 20 & topic = 14935
What is the difference between string and stringbuffer http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 7007
5 What is 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 keep the window in front of the http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 16587
9 Date display formatting http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 16750 how to convert the Gregorian and lunar calendars ????????? 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 can I determine whether the input is a character or a number? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 4687
12 what is the difference between finalize () and system. GC () http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 4656
13. How do I enter 2 on the keyboard .... Printed 50 ??? System. In. Read () usage http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 4605
15 classes of polymorphism http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 4737
16 what if a program contains multiple. java files that are associated with each other and need to be compiled now! Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 5000
17 discussion of interfaces and classes http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 5007
18. How do I convert Chinese characters into code? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 4991
19 can I read the content of jtextarea in one row? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 4785
20 How do two date strings plus or minus http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 4812
21. What are the functions and functions of "this? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 4780
22 questions about polymorphism and multilevel 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 Object-Oriented Design? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 7069
24 A question about Java internal classes http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 712
25 how to get the IP http://www.chinajavaworld.net/forum/topic.cgi of the Local Machine? Forum = 20 & topic = 7151
26. What is the difference between throw and throws? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 7005
27 why should abstract classes be introduced in Java ?? What is his role and advantages ?? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 160
28 final, What Is http://www.chinajavaworld.net/forum/topic.cgi when private defines a variable? Forum = 20 & topic = 7042
29 question http://www.chinajavaworld.net/forum/topic.cgi for Java modifiers and character output? Forum = 20 & topic = 7054
30. What is an anonymous class? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 7070
31. How can I run another executable file on the hard disk in an application? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 7066
32. How do I obtain the date of today ??? I want to get the format yyyy-Mm -- dd. How can I do this ??? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 7081
How to convert hexadecimal to decimal? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 7079
34. How to generate a. jar file? Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 7073
35 can final inherit override http://www.chinajavaworld.net/forum/topic.cgi? Forum = 20 & topic = 25880 & show = 0
|
Excellent article website recommendations: 1. How to quickly become a Java expert [tomjava original] Http://www.java.com.cn/showtopic.asp? Topic_id = 7719 & forum_id = 31 2. An old engineer (ten tips for young electronic engineers) Http://www.pconline.com.cn/pcjob/ittest/empolder/0312/261734.html 3. A large number of Java program examples, examples for almost all Java classes Http://javaalmanac.com/egs/ 4. the Java tutorial on Sun Http://java.sun.com/docs/books/tutorial/ 5. Let's talk about Java's learning direction (reprinted) Http://www.430000.net/printpage.asp? ArticleID = 46 6. Java learning path Http://www.csdn.net/develop/author/cxy/way_to_java.shtm 7. Java code specification from sun Code conventions for the javatm Programming Language Http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html 8. Java program code specification from IBM Http://www-900.ibm.com/developerWorks/cn/java/java_standard/index.shtml 9. 50 tips for C ++ beginners: Good for Java too Http://post.baidu.com/F? Kz= 647098 10. Useful articles for beginners Http://www.mifun.net/pengjie/myweb/article/article.asp? Id = 95 & sort = jsp 11. Wisdom of inquiry How to ask questions the smart way Http://www.catb.org /~ ESR/FAQs/smart-questions.html English version: http://alfredy.myetang.com/ 12. From coding fan to true technical experts Http://www.chinajavaworld.net/forum/topic.cgi? Forum = 18 & topic = 12814 & show = 0 |
|