Second, JDK Documentation
Documentation also has downloaded connections in the JDK download page, which is recommended to download the Documentation at the same time. Documenta
TION is the most important programming manual covering the description of the entire Java all aspects. It can be said, learn
Java programming, most of the time is looking at this documentation. I am carrying it with you, write the Java generation
At the time of the code, you can see it at any time.
Third, the application server (App Server)
App Server is a platform running Java Enterprise Components that forms the main operating environment of the application. Current mainstream AP
P Server is a WebLogic Server and IBM's WebSphere and free JBOSS,
It is possible to learn, personal recommendation WebLogic, because its architecture is clearer, developed and deployed more
Adding easy, is the preferred development platform for Java enterprise software developers. Believe in a brief introduction to several common App Server
:
1, Tomcat
Tomcat is not a true app server in strict sense, it is just a support for running serlvet / jsp
Web containers, but Tomcat also expands some App Server features, such as JNDI, database connection pool, user transaction
Processing, etc. Tomcat is very widely used in small and medium-sized Java web applications, so this article is a little download
, Install and configure Tomcat introduction:
Tomcat is a sub-project under the Jakarta project under Apache, its main website is: http://jakarta.ap
Ache.org/tomcat/, Tomcat latest version is Tomcat4.1.27, the software download connection is: http: // www.
Apache.org/dist/jakarta/tomcat-4/binaries/.
Download Tomcat can download the ZIP package directly, you can also download the EXE installation package (personal suggestion zip cleaner), no matter
After which case, after downloading is installed (ZIP directly decompressed). Need to set two environment variables:
Java_Home = C: /J2SDK1.4.2
Catalina_home = d: / tomcat4 (your Tomcat installation directory
This is installed, start Tomcat Run Catalina_Home / Bin / Startup.bat, close Tomcat Run Shu
TDown.bat script. After Tomcat starts, use the 8080 port by default, so you can access http:// LO with your browser.
Calhost: 8080 tested whether Tomcat started normally.
Tomcat provides two management tools for two web interfaces, and the URLs are:
Http: // localhost: 8080 / admin / index.jsp.jsp
Http: // localhost: 8080 / manager / html
Before enabling these two management tools, you need to manually configure the administrator user and password. Use a text tool to play
Open Catalina_Home / conf / tomcat-users.xml, add the following line:
Households to log in to the above two management tools, perform Tomcat configuration and manage through the web way.
2, Bea WebLogic
WebLogic can be downloaded to the latest weblogic8.1 Enterprise Edition after free to register on the BEA website, license
It is entirely enough for free for 1 year. WebLogic download connection: http://commerce.bea
.com / index.jsp, weblogic online documentation: http: //edocs.bea.com/.
3, IBM WebShpere
WebSphere can also be downloaded to a free trial version, and you can see WebSph's developerWorks website.
ERE trial product download and related WebSphere's information, the connection of the developerWorks Chinese website is: http
: //www-900.ibm.com/developerWorks/cn/wsdd/ download connection: http: // www7b
. Software.ibm.com / WSDD / Downloads / Wassupport.html.
4, JBoss
JBoss is a free open source App Server, free from JBoss website to download: http://www.jboss.org/i
NDEX.html, however, JBoss's documentation is not free, you need to spend money, so I have to learn JBoss for us.
Obstacle. There are several good JBoss configuration documents on JDON, which can be used for reference: http://www.jdon.com/i
Dea.html
Fourth, Java application operating environment
Java applications can be divided into the following aspects:
1, Java desktop application
Desktop applications generally only need JRE support is sufficient.
2, Java web application
Java's web application requires at least JDK and a web container (such as Tomcat), and a multi-user database.
Web applications are at least three layers:
Browser layer: browser displays user page
Web layer: Run servlet / jsp
DB layer: backend database provides data access services to Java programs
3, Java enterprise application
Enterprise applications are more complicated, can be extended to N layers, the simplest situation will be divided into 4 layers:
Browser layer: browser displays user page
Client layer: Java client graphics (or programs for embedded devices) interact with Web or EJB
Web layer: Run servlet / jsp
EJB layer: Run EJB, complete business logic
DB layer: backend database provides data access services to Java programs
4, Java embedded application
Java embedded applications are a field of unreason, engage in embedded development, need to download J2ME development kits from Sun, J
2ME includes embedded device-specific virtual machine KVM, and the JVM included in the normal JDK is different. Also need
The specific embedded vendor downloads the simulator.
Java Learning Path (2), books
Learn a new knowledge, it is impossible to expect only one thing, or two books can be fully grasp. Need to have a step-by-step reading process. I recommend Oreilly published Java series books.
Here I only want to add a little view, many people learn Java is from "Thinking in Java".
But I think this book is not suitable for beginners. I think the correct way to use this book should be an auxiliary
Reading. "Thinking in Java" is not a complete introduction to Java's entire system, but a jumping write
Making method is a method similar to TIPS to analyze and explain a lot of knowledge points in Java.
For beginners, it is best to find a book in Java, but more complete steps of introducing Java's grammar
, Object-oriented features, core class libraries, etc., while watching this book, you can see "Thinking in Ja"
VA "to deepen the use of Java understanding and principles, while you can completely understand the entire system of Java.
For Java's entry books, Cai Xueqi recommended is Oreilly "Exploring Java, 2nd Edition" or
"Java in a nutshell, 2nd edition", I didn't have seen these two books. actually, I
I feel that the Electronic Industry Press "Java 2 Programming" or "Java 2 is entitled to proficiency".
In all Java books, it is most useful, not O'Reilly Java Serials, truly most
Use the JDK documentation! Almost all the knowledge you want to have in the Documentation,
The most important part of them is of course the API document of the Java underlying class library, which is organized according to Package, for each one
Class has a detailed explanation, its inheritance relationship, does it achieve an interface, which occasions are usually used, or
Check the properties and methods of all of its publications, interpretation, meaning, use of each property, call for each method
The meaning of the number, the parameters, the type of return value, and the abnormality that may be thrown. It can be said that all
Books in Java programming are actually introduced in terms of multi-language, easy-to-understand language.
There are some types of use of some classes contained in a Package in Documentation. Therefore, it will never leave the Zong, such as
If you have enough ability to learn Java's class libraries through Documentation, then it is basically no need to see it.
His books. In addition, Documentation is also a must-have manual, and there are three documen on my desktop.
TATION's shortcuts, Documentation, servlet2.3 of J2SDK1.4.1, respectively, and Documentation and
J2dkee1.3.1 Documentation. With this three documentation, what other books do not need
.
For Java Web programming, the most core is to be familiar with and master HTTP protocols, this is not related to Java, in cooked
After the HTTP protocol, you need to be familiar with Java's implementation HTTP protocol, which is the servlet API, so he weighs
What you want is a servlet API. Of course, for beginners, learn the Web programming directly through the Servlet API.
Very difficult, I recommend O'Reilly "Java Server Pages" book to learn web programming. In the book of EJB, "Enterprise Javabeans, 2nd Edition" is a very good book, EJB's school
The goal of the learner is relatively high, it is difficult to get started, but this book completely reduces the difficulty of learning, especially important, EJ
B learning needs to be implemented in conjunction with an App Server, so in learning EJB, you must learn some
APP Server, and this book has three books, which are WebLogic 6.1, WebSphere 4.0 and JBoss.
3.0 Real as the examples of the above deployment. It is really theoretical and practical. While learning EJB, you can look at the side
Do it, EJB learning will become easier.
But this book also has a problem, which is the old version, mainly talking about EJB1.1 norms and some EJB2.0 specification. and
This book written by ED Roman is completely written according to EJB2.0 specification, in-depth, overwarter
EJB programming, and there are still many programming experience Tips, and one of the very recommended books very recommended by EJB.
If it is a combination of WebLogic to learn J2EE, "J2EE App to BEA WebLogic Server is definitely the first choice
Things, although it is the text of WebLogic6.0, it is still worth buying. This book is a textbook recommended by the BEA. The author is also
BEA engineer. The Chinese version is now visible everywhere. This book combines WebLogic to introduce all aspects of J2EE.
The technology is developed and deployed on the WebLogic platform, and the practice guiding significance is very strong.
After mastering the basics of Java platform and J2EE, it is further simple to learn how to use OO.
Software design, you must learn "design mode". Sun published a "J2EE core mode"
It is a book for each architect that develops Java business platform software. This book has a comprehensive introduction to the J2EE architecture
Various design patterns are the designer's must-read books.
Java Learning Path (3) Process
Every human learning method is different, and a person's method is not necessarily suitable for another person, I can only talk about my own learning.
method. Because I have learned Java, I have never asked others, so the process of learning is basically completely
I have explored it. I don't know if this method is a better way, I can only give you a little more reference.
.
Learning Java's first step is to install JDK, write a Hello World, actually JDK's learning is not so simple, close
There are two problems in JDK, it is easy to have always plagued the Java programmers: one is the problem of ClassPath, in fact
In principle, it is to figure out how JRE's ClassLoader loads Class; another problem is Package and
Import problem, how to find the path problem of the class. The two questions are clear, and they have removed Java and
Use the biggest obstacle to JDK. It is recommended to look at Wang Sen's "Java Deep Adventures", which has been deeply explored for these two issues.
discuss.
The second step is to learn the syntax of Java. Java's syntax is class C , basic mainstream programming language is not class C,
Class C , there is no new thing, so the grammar learning is probably a half-day time. The only thing to pay attention to
There are a few uses that are not easy to figure out keywords, public, protected, private, static, when used, why is it used, how to use it, this may need someone to point to it, I originally completely pondered it.
It took a long time. But then I saw "Thinking in Java" this book told these concepts.
of.
The third step is to learn the characteristics of Java's object-oriented programming language. Such as inheritance, constructors, abstract classes, connection
Polymorphism, overload, coverage, and Java exception handling mechanism. For a background of object-oriented language
When people say, I think this process takes a long time, because I don't have C experience before learning Java, only c
Experience, I spent about a month, just thoroughly engaged in these concepts, repeated the example above
Try to figure out, modify, try, repeatedly see that the contents of the chapter, seeing, can't see 5 times, it is completely realized
. But I think if there is C experience, it should be enough for a day or two. So, you can see more during this process.
"Thinking in Java" This book is very thoroughly explained to the object. Unfortunately, when I learned, and
Didn't see this book, I spent a lot of time, learning through my own try and trying to try.
The fourth step is to start familiar with Java class libraries. Java's basic class library is actually the JDK installation directory. JRE / LIB / RT.
JAR this package. Learning the underlying library is to learn RT.jar. There are very many classes in the base class library. It is said that there are more than 3,000
I have no statistics. But really is only 4 of our most core, respectively.
Java.lang. *;
Java.io. *;
Java.util. *;
Java.sql. *;
The study of these four packages, each package can be written into a thick textbook, and O'Reilly is indeed doing this.
of. I think if the time is tight, it is impossible to learn from four books. I think the better learning method is
Such:
First, you must read the entire package framework to understand the composition of the entire package class, interface, and exception.
It is best to find an article that introduces the entire package framework. The first few chapters of these special introduction packages should be these
The overall framework content introduction.
The grasp of the overall framework of the package is not to be familiar with each class, remember what properties, methods. I don't think about it.
living. But to know what kind of classes of the package, what is the use of these classes, the most core of several classes
Is the function of completing. When I gave it to the training, I usually speak a package in a class, so I can't introduce a detailed introduction.
Each class is used, but I repeatedly stressed that I will tell you how to tell you how to adjust how to adjust
Using, you don't ask you to remember the way the class is called, but if you want to know, what kind of Java provides us, each
What is the occasion? When I encountered a problem, I know which class, or which kind of combination of classes can be solved.
Decisive me, That'All! When we write the program, as long as you know which class should be used to complete your
It is enough to work. When encoding, the specific method is called, it is written code, while checking the Documentation, all
All things are in the documentation, do not ask you to remember, actually can't remember more than 3,000 categories of total of nearly 100,000 ways to call. Therefore, it is extremely important to grasp the grasp of the overall framework of each package.
In the fifth step, through the above learning, if you are more solid, you will have the foundation of Java, there is rest.
Work is to clear the documentation in addition to some of the other more useful classes other than 4 packs. Believe in progress
To this step, Java's self-study ability has been cultivated, and it can be directly learned to learn the level of Documentation.
. In addition to doing GUI programming, other people who have use in JDK are these:
Java.text. *;
Java.net. *;
Javax.naming. *;
There are few more classes that are really used in these packages. There are only a few, so you don't need to spend a lot of time.
In the sixth step, Java Web programming, the core of web programming is HTTP protocol, HTTP protocol and Java have nothing to do, if not familiar
In the HTTP protocol, although you can also learn the servlet / JSP programming, but you can't reach a contrast, one through 100 Tong's realm.
. So the learning of the HTTP protocol is essential. If you are familiar with the HTTP protocol, there is a good base for Java programming.
Basis, learning servlet / JSP is easy to make, I learned Servlet / JSP for a week, then
I started using JSP to do projects.
In the study of servlet / jsp, the weight is still servlet documentation. The most common class of servlet API is very
Less, you can master the time. Take these classes to see several examples. Servlet / JS
P programming essence is repeatedly calling these classes to talk between Web Server and Brower through the HTTP protocol. In addition to
JSP, you need to be familiar with several common JSP tags, and if you can't hold it, the temporary investment is.
In addition, Java Web programming learns to put in the design mode of Web Application, how to logic
Analysis, and make a reasonable design, according to the requirements of the MVC design model, use the servlet and JSP to complete different
Logic layer, master how to perform flow control and data sharing between servlet and JSP, and Web Applicat
ION should configure and deploy.
Step 7, J2EE programming
If the above learning process is relatively smooth, the difficulty is difficult to improve. Because of the knowledge above
The content is only involved in one aspect, and the J2EE norms such as EJB, JMS, JTA are often comprehensive in several Java technology.
The crystallization of the combination, so the difficulty is relatively difficult.
First, you must learn JNDI, JNDI is the App Server Location Server Resource (EJB Components, Datasouce, JMS)
Find a method, if you are not familiar with JNDI, EJB, JMS these things can't go. JNDI is actually Java
X.Naming. * This package is easy to use. The difficulty is the configuration of the server resource file. For server resources
The configuration of the file is needed to see the special document specification, such as the WEB.XML, EJB-JAR.XML, etc.
Wait. For each different app server, there is also your own service resource profile, it is also familiar.
You can then learn JTA, mainly to understand the method of JTA's control for transactions, and what is used in any occasion.
Here you can make an example, we know that the general situation can be transactional for a database connection (Conn.commit (False), ...., as an atomic operation, but assumes me business
The demand is to make the operation of the two different databases as an atomic operation, can you do? At this time, you can only use JT.
A. Suppose the operation process is to insert a record first to the A database, then delete another record of the B database, we write
The code is not controlled to do an atomic operation. With JTA, the APP Server is used to complete the control.
Learn to serialize and RMI before learning EJB, RMI is the basis of EJB. Then learn JMS and EJB, for EJB
Said, the most important thing is to understand how EJB is called by RMI to achieve calls to far-end objects, and in what circumstances
Use EJB.
After learning EJB, JMS these things, you may be aware of the knowledge of two areas, one
Is UML, the other is Design Pattern. The design of Java Enterprise Software is very important to the framework design.
A good software framework is a necessary condition for software development. At this time, you should start the focus of learning.
In the study of design patterns and frameworks, master EJB design patterns and J2EE core through learning and practical programming experience.
Heart mode.
Inside the J2EE specification, there are many business technology in addition to EJB, JMS, JTA, Servlet / JSP, JDBC,
It will be introduced here.
There is also a new field Web Services. Web Services also has no new things at all, it is like a kind
Binders, you can unify different services to provide a unified call interface. As a user, I just need
Get the service provider to give me WSDL (description to the service), it is enough, I don't know if the server provider is available.
Is the service of the EJB component, or a .NET component, or what CORBA components, or other implementations, I also
No need to know. The greatest place in Web Services is to provide ways and calls for service by unified service.
The sharing of the entire Internet service is a very exciting technical field. Web Services seems to be currently
There is no good book, but you can learn by checking the information on the network.
Java Learning path (4) Method
As a programming language, Java is the best way to write code. After you learn a class, you can
Write a simple example program to run, see what results, then call a few classes, see
Operating results, this is very intuitive to give classes to learn, and memories are very deep. Then you should not meet the code
Through, you should think about it, if I don't write, change it, try again. Remember which high person said to learn
The process is a destruction process, putting examples in the book, learn the example written by Documentation in operation.
Constantly try to implement different methods, constantly try to destroy the structure of the code, see what results it will.
In this way, you will be very universal to master Java.
For example, we have compiled Hello World
Public class helloworld {public static void main (string [] args) {system.
Out.println ("Hello World");}} Many beginners are not very understood why the main method must define the public static void main (Stri
Ng [] args), can you write? Including that I have such questions when I just learned Java. Want to know the answer?
? Very simple, you change your name to you, see what is wrong, then analyze according to the error information;
Remove the main PUBLIC, try to see, what is wrong; Static removes, can not run; don't know the MAIN
Whether the law must pass a string [] array, change String [], change to int [], or string to try;
You don't know if you must write the Args parameter name, you can also change the args to other names to see how the results are run.
When I first learned Java, I did this, and I changed the Hello World program for seven or eight times, constantly running.
Analysis of the results of operation, and finally understand why the main method is defined.
In addition, I have STAIC, PUBLIC, PRIVATE, Exception, Try {} catch {} finally {}, etc.
I don't know very much at the beginning, it is to run the example above the example, and then start to destroy it, constantly
I have a question in my heart to rewrite the program, see if I can run, is it like it?
Get the expected result. Thus, although time is time, an example program has repeatedly destroyed several times. so I
Thoroughly learned about this related knowledge. Sometimes even deliberately write some wrong code to run, see if you can get
Expected run error. This is to be profound for programming.
Specially worth mentioning is that JDK has a great debugging function, -verbose
Java -verbose
Javac -verbose and many other JDK tools have this option
-verbose can display where the JVM is loaded in sequence, and these valuable debugging
Information can help us analyze what JVM has done in the process of execution.
In addition, in the learning process, many of this destroyed routine written, should be consciously saved.
The typical routine accumulated in the work should also be regularly sorted, and it has a code base. Encounter
Similar questions, go to the code bank Copy & Paste, Search & Replace, just improved
Speed. The most ideal situation is to abstract the universal routine, form a universal class library, package
Great. Then it is more reusable.
So I think it is not a special need for routines, and I write the destruction routine is the best example, if you are
If you write the code, I highly recommend you to see the JAVA source code for the JDK underlying class library. Install directory in JDK
There will be a src.zip below to see the entire JDK underlying class library completely, that is, Rt.jar Java
Source code, you can refer to how Sun is writing Java programs, what is the specification looks like. I am studying Jav
When a class library, when some places are not very clear, or want more clear understanding of the details
At the time, it is often open the source code of the corresponding class. By looking at the source code, all the questions will be swept away.
Java Learning Path (5) Resources 1, http://java.sun.com/ (English)
Sun's Java website is a place where you should look often. Don't say more.
2, http://www-900.ibm.com/developerWorks/cn/
IBM's DeveloperWorks website, English is good to go to English primary site. It is not only an excellent face-oriented
Icon's analysis design website, is also an excellent website for Web Services, Java, Linux. highly recommended! ! !
3, http://www.javaworld.com/ (English)
Discussions and news about many new technologies in Java. I want to know more about the roof of Java, which is better here.
4, http://dev2dev.be.com.cn/index.jsp
BEA's developer garden, BEA as the most important App Server manufacturer, there are many unique technology, on WebLogic
Friends doing development don't miss it.
5, http://www.huihoo.com/
Gray fox power website, a professional middleware website, although not a professional Java website, but in J2EE company
Technical aspects have a deep attainment.
6, http://www.Theserverside.com/ (English)
TheServerside is a well-known website for Java Server applications.
7, http://www.javaresearch.org/
Java research organizations, there are many excellent Java articles and tutorials, especially in JDO articles.
8, http://www.cnjsp.org/
JSP technology website, there are quite a number of Java articles and resources.
9, http://www.jdon.com/
JDON Forum, is a personal Chinese J2EE professional technology forum, in many Java Chinese forums, JDon
One is a very high technical content, the quality of posts is very good.
10, http://sourceforge.net/
SOURGEFORGE is an open source software, which also has very rich open source of Java open source.
Famous software.