Java learning from entry to the master

  Java Learning Path (1), tools, articles 
  First, JDK (Java Development Kit) 

  JDK Java is the core of the whole, including the Java runtime environment (Java Runtime Envirnment), a heap of Java-based tools and Java Class Library (rt.jar).    No matter what the Java application server essentially a version of the built-in 
  JDK.    Therefore master learn Java JDK is the first step.    Most mainstream JDK Sun's JDK releases, in addition to Sun, there are many companies and organizations have developed their own JDK, for example, IBM's development of the JDK, BEA company 
  Jrocket, and the development of JDK GNU organizations, and so on.    IBM's JDK which includes the JVM (Java Virtual 
  Machine) operating efficiency than the JVM Sun JDK includes much higher.    The special operation in the x86 platform Jrocket operating efficiency in the service side also much better than the Sun JDK.    Still, we still need to grasp the first Sun JDK. 

  1, JDK download and install 
  JDK also called J2SE (Java2 SDK Standard Edition), from Sun's Java Web site that 
  Http://java.sun.com/j2se/downloads.html, JDK current J2SDK1.4.2 the latest version is proposed to download the version of the JDK, the download page here: http://java.sun.com/j2se / 1.4.2/download.html. 

  Download executable is a good JDK installation procedures, the default will be installed in the C: \ Program Files \ Java \ directory install a JRE (for the browser to use), C: \ j2sdk1.4.2 the installation of a JDK (including a 
  JRE).    Then we need in the environment variable PATH java increase in the forefront of the path C: \ j2sdk1.4.2 \ bin.    JDK installed on this well. 

  2, JDK tool orders 
  JDK of the most important command-line tools: 
  Java: Start JVM implementation of class 
  Javac: Java Compiler 
  Jar: Java tools package 
  Javadoc: Java documentation generator 
  These command line must be very, very familiar with, for each parameter should be very proficient才行.    For these orders the study, 
  JDK Documentation on the detailed documentation. 


  Second, JDK Documentation 

  Documentation in the JDK download page is the link to download, the proposal Downloads Documentation. 
  Documentation is the most important thing programming manual covers all aspects of the whole Java content description.    It can be said that learning Java programming, most of the time is spent looking at this Documentation above.    I am a portable, writing Java code when ready Show, maintaining a minute later. 


  Third, the application server (App Server) 

  App Server is running components of the Java Enterprise platform, constitutes the main application software operating environment.    The current mainstream 
  App Server is BEA's Weblogic Server and IBM's Websphere and free Jboss, and select one of these learning can be a personal recommendation Weblogic, because it more clean architecture, the development and deployment of more convenient, is the Java Enterprise Software Development staff preferred development platform.    Below briefed several commonly used App 
  Server: 

  1, Tomcat 
  Tomcat is not a strict sense, the real App Server, which can support only one operating Serlvet / JSP 
  The Web containers, but also expanded the number of Tomcat App Server features, such as JNDI, database connection pool, user transaction processing, and so on.    Tomcat was a very wide range of applications in the small and medium-sized Java Web application, this paper to do something to download, install and configure the Tomcat description: 

  Apache Tomcat is organized under a Jakarta sub-project, and its main Web site: http: 
  / / Jakarta.apache.org / tomcat /, is the latest version of Tomcat Tomcat4.1.27, software download link is: http://www.apache.org/dist/jakarta/tomcat-4/binaries/. 

  Tomcat can be downloaded directly download zip bag, can also download the exe installation package (Personal recommendations zip cleaner more), no matter what circumstances, installed after the download is complete (zip can be decompressed directly.)    Need to set two environment variables: 

  JAVA_HOME = C: \ j2sdk1.4.2 
  CATALINA_HOME = D: \ tomcat4 (your Tomcat installation directory) 

  This installed, and start Tomcat running CATALINA_HOME \ bin \ startup.bat, closed Tomcat running 
  Shutdown.bat script.    Tomcat launch, the default port 8080, it can be used browser visit http: 
  / / Localhost: 8080 to test whether it is normal start Tomcat. 

  Tomcat provides two Web interface management tools, URL are: 
  Http://localhost:8080/admin/index.jsp 
  Http://localhost:8080/manager/html 
  In the opening of these two management tools prior to the need to manually configure user and administrator passwords.    Opened with a text tool CATALINA_HOME \ conf \ tomcat-users.xml this document, we add the following lines: 

  <role Rolename="manager"/> 
  <role Rolename="admin"/> 
  <user Username="robbin" password="12345678" roles="admin,manager,tomcat"/> 

  Such users "robbin" with a super-administrator privileges.    After the restart Tomcat, you can use the user to the landing above the two management tools through a Web-Tomcat configuration and management of the. 

  2, BEA Weblogic 
  BEA Weblogic can go to the website for free download to registered after the latest Weblogic8.1 Enterprise Edition, available free of charge to a License years, in fact this has been fully sufficient.    Weblogic download link: http: 
  / / Commerce.bea.com / index.jsp, Weblogic online documentation: http://edocs.bea.com/. 

  3, IBM Webshpere 
  Websphere can also download a free trial version of IBM's developerWorks site can be seen 
  Websphere trial product downloads and related Websphere information, developerWorks Chinese website link is: http://www-900.ibm.com/developerWorks/cn/wsdd/, Websphere download links: 
  Http://www7b.software.ibm.com/wsdd/downloads/WASsupport.html. 

  4, Jboss 
  Jboss is free open source App Server can be free from Jboss website: http: 
  / / Www.jboss.org / index.html, but Jboss document is not free, and the need to spend money to buy, so we set up a study Jboss certain obstacles.    In Jdon have several good Jboss configuration files can be used to reference: 
  Http://www.jdon.com/idea.html 


  4, Java runtime environment applications 

  Java application can be simply divided into the following areas: 

  1, the Java Desktop Application 
  General desktop applications JRE only need the support was sufficient. 

  2, Java Web Application 
  Java Web Application JDK and the need to install at least one web containers (such as Tomcat), as well as a multi-user database, Web applications at least divided into three layers: 
  Browser layer: a user's browser pages 
  Web layer: operating Servlet / JSP 
  DB layer: the back-end database, to Java programs to provide data access services 

  3, Java enterprise applications 
  Complex enterprise applications can be extended to n-tier, the simplest cases will be divided into four layers: 
  Browser layer: a user's browser pages 
  Client layer: Java client graphical procedures (procedures or embedded devices) directly or EJB and Web-layer interaction 
  Web layer: operating Servlet / JSP 
  EJB layer: operating EJB, business logic operation completed 
  DB layer: the back-end database, to Java programs to provide data access services 

  4, Java embedded applications 
  Java embedded applications is a rising field in the embedded development, the need to download from the Sun J2ME development kits, 
  J2ME includes a virtual machine for embedded KVM equipment, and general JDK contained in the JVM to be different.    There was also a need to specific embedded download the simulator manufacturers. 


  Java Learning Path (2), chapter books 

  Learning a new knowledge, could not be expected only Kanyiben or two books will be able to fully grasp.    The need for a step-by-step process of reading.    I recommend Oreilly books published by the Java Series. 

  Here, I just want to add that view, a lot of people learning Java is from "Thinking in Java" start with this book, but I think that this book is not suitable for beginners.    I think that the right to use this book as a method should be supplementary reading materials.    "Thinking in Java" is not in the integrity of the entire system on Java, but a leaping writing method is a method similar to the tips of many Java carried out an in-depth knowledge of the analysis and interpretation. 

  For beginners, it is best to find an entry Java books, but relatively complete progressive on Java syntax, object-oriented characteristics, the core class libraries, and so on, looking at this book, you can sync of "Thinking in 
  Java, "to deepen the understanding of Java and the use of principle, while Java can complete understanding of the entire system. 

  The Java-entry books, Tsai Yung is recommended Oreilly "Exploring Java, 2nd Edition" or "Java in a Nutshell, 2nd Edition (for C + + background)," I have not read these two books.    Actually, I feel that the electronic publishing industry "Java 2 programming explain" or "Java 2 from entry to the intimate knowledge of the" very good. 

  Java books in all, the issue of the utmost useful fact, the Java Serials O'reilly not, the real issue of the utmost JDK useful is the Documentation!    Almost all you want to be in the Documentation of knowledge are all inside, which is of course the most important part of the foundation class library Java API documentation is organized in accordance with the package, for each class has a detailed explanation, it Inheritance, the achievement of a certain interface, which is usually used in occasions, 
  It also can be found all public properties and methods, the interpretation of each attribute, meaning, the use of each method, 
  Call parameters, the significance of parameters, return value type, and methods may be thrown out of the abnormal, and so on.    It can be run, all on the books Java programming actually is in a more user-friendly language, and a good organization to introduce Documentation inside a package containing some of the use of it.    So central theme remains the same, if you have the ability to learn directly through Documentation to the Java class libraries, so basically do not need to see the other books.    In addition, the Documentation is also required manual programming, I have three desktop shortcuts Documentation were J2SDK1.4.1 the Documentation, the Servlet2.3 
  Documentation and J2SDKEE1.3.1 the Documentation.    With this three Documentation, what other books are not needs. 

  For Java Web programming, the core is to become familiar with and grasp the HTTP protocol, and Java has nothing to do on this, in a familiar HTTP agreement on the need to know the Java class libraries to achieve the HTTP protocol, which is Servlet API, the most important thing is Servlet API.    Of course for beginners, directly through the Web to learn Servlet API 
  Programming is very difficult, I recommend O'reilly "Java Server Pages," this book to learn Web programming. 

  EJB books, "Enterprise JavaBeans, 2nd Edition" is a very good book, EJB learning threshold is relatively high, the entry difficult, but this book completely reduce the learning difficulty, especially important point is that the EJB 
  A combination of the learning needs of a concrete realization of App Server, EJB learning, we must also simultaneously learning some App Server, and this book related to the three books were Weblogic6.1, and Websphere4.0 
  JBoss3.0 deployment in the above examples have done.    Is not only theoretical, have practical.    EJB learning at the same time, can look on the job, EJB learning will become very easy. 

  But this book also has a problem, is the older version, the main stresses EJB1.1 norms and the norms of EJB2.0.    And 
  Ed Roman wrote "Mastering EJB 2.0," This book is written under the EJB2.0 standardized, and easy-EJB programming covering all aspects, and there are many tips programming experience, but also very EJB learning of the recommended books 1. 

  If it is to learn with Weblogic J2EE so, "J2EE application with BEA Weblogic Server" is definitely the preferred reading material, although described Weblogic6.0 is still worth buying, this book is recommended by the BEA official teaching, the author is BEA company engineers .    Now Chinese version of the already can be seen everywhere.    This book introduced with Weblogic J2EE technology in all aspects of the Weblogic platform in the development and deployment of practice guiding significance is very strong. 

  With the Java platform based on J2EE knowledge and the knowledge of the future, is to learn how to further the use of OO software design methods, then must learn from the "design mode."    Sun's publication of a "core J2EE pattern." 
  Java is the development of each enterprise platform software architect of the necessary books.    This book introduces a comprehensive architecture of J2EE design pattern, the designer is required reading books. 

  Java Learning Path (c) of article 

  Everyone's learning method is different, not necessarily a method for another person, I can only talk about their own learning methods.    Java is because I am completely self-learning, has never asked the others, so the learning process is almost entirely out of their own exploration.    I do not know whether this approach is a better way, we will only be able to provide a reference point. 

  The first step in learning Java JDK installed, writing a Hello World, JDK  In fact, the study not so simple. 
  There are two issues on the JDK is very easy Java programmers have been plaguing the local: One is the CLASSPATH issues, in fact from theory, it is to understand how the JRE ClassLoader loading Class; Another problem is that 
  Package and import problems, how to find the path of the problem.    Explored these two issues clearly, wiping out the study on the use of Java JDK and the biggest obstacle.    Recommended look at the Wang Sen's "Java depth adventure," these two issues an in-depth discussion. 

  The second step is learning Java syntax.    Java is the syntax of C + +, basically not the mainstream programming languages like C, C + + category, no new things, learning grammar, about half the time is sufficient.    Only needs attention is not easy to find out there are several keyword usage, public, protected, private, static, and when used, why use, and how use, which may require someone to the guidance that I had is totally themselves pondering out of the time spent for a long time.    But then I see that the "Thinking in Java" This book is above the concept of these stresses. 

  The third step is learning Java object-oriented programming language of the place.    Such as inheritance, the constructor, abstract classes, interfaces, and methods of the multi-state, overloading, coverage, the Java exception handling mechanism.    For an object-oriented language background of the people, I think this process will take a very long long time, because not before learning Java C + + experience, only C 
  Experience, I probably spent about a month bar, only thoroughly understand these concepts, the book above example again, we tried to figure out, modify, to the contents of the chapters repeated Kanguolai, at the past, read no fewer than five times before a thoroughly comprehend.    But I think if there are C + + experience, the 12 days should be sufficient time.    So in this process, we can see more "Thinking in Java" This book, the object-oriented presentation very thorough.    It is a pity that I am learning, 
  And have not seen this book, spent a lot of their time, through their own to try and figure out where to Society. 

  The fourth step is to become familiar with the Java class libraries.    Java Class Library is actually the basis of JDK installation directory Below jre \ lib \ 
  Rt.jar this package.    Learning is the foundation class library learning rt.jar.    Foundation class library there are very, very many of the categories.    It was reported that 
  Over 3000, I do not have the statistics.    For us, but really the crux of only four, namely, 
  Java.lang .*; 
  Java.io. *; 
  Java.util .*; 
  Java.sql .*; 

  The four learning packages, each package of learning can be written in a thick textbook, and O'reilly and indeed do so.    I feel that if the time of the bear, it is impossible to read through the four books to learn.    I think a better learning method is this: 
  We must first read through the framework of the whole package, the whole package understanding of the class, interface, the composition of exception, it is best to find the framework of the entire package of articles.    These packages of books devoted to the previous chapter is that these should be the overall framework introduced. 

  Overall framework of the package is not familiar with the certainty of each category of use, remember what it attributes, and methods.    Would also not remember the mind.    But to know what the package of components, the use of these categories what is the crux of the few categories were completed what function.    I give general training course is a course stresses a bag, so it is impossible detailed account of the use of each category, but I have repeatedly stressed that, I say to you, all these are not the type to tell you is how the call or ask you to remember that kind of method calls, but you have to understand that Java provides us with which categories, each category is spent on what occasions, when I encounter problems when I know which type, or any number of the combination of my question can be resolved, That'all!    When we write specific procedures, as long as you know the type with which to complete your work was sufficient.    Encoding time, the specific method calls, while writing code, and checking Documentation, all things are Documentation inside, we do not ask you to remember that you are not remember the actual type of a total of more than 3,000 nearly 100,000 method call.    Therefore, the overall framework of each package certainty becomes paramount. 

  Step 5, by the above study, if the school's comparatively solid, on the basis of a solid foundation in Java, the remaining work to be done is clear Documentation In addition to the above four packets other than some of the more useful category .    Believe that the progress to this step, Java self-learning ability has been nurtured, we can learn to direct the level of the Documentation.    In addition to GUI programming to be done, the other will be useful if JDK inside these packages: 
  Java.text .*; 
  Java.net .*; 
  Javax.naming .*; 
  These packages inside of the more genuine class rarely, and only a few, so there is no need to spend a lot of time. 

  Step 6, Java Web programming 
  Web programming is the core of the HTTP protocol, HTTP and Java unrelated to the agreement, if not familiar with the HTTP protocol, although it can learn Servlet / JSP programming, but not so as a single 100-level.    So HTTP protocol is an essential feature of the study.    If familiar with the HTTP protocol, there has been a good Java programming foundation, learning Servlet / JSP 
  It easy, I learn Servlet / JSP will use less than one week, then began a project to do with JSP. 

  In Servlet / JSP of the study, the first is still heavy Servlet Documentation.    Servlet API most common type rarely spend less time can be mastered.    These categories are Kanyibian and writing a few examples try. 
  Servlet / JSP programming is in the nature of these categories to repeated calls via HTTP Web Server and in the agreement between Brower conversation.    In addition to JSP, also need to know a few common JSP markings, the specific wording not remember the case, the Provisional check yourself. 

  Besides learning Java Web programming Web Application emphasis should be placed on the design model, how to carry out the analysis of business logic and rational design, in accordance with the requirements of MVC design pattern using Servlet and JSP completed different logic layer and master How Servlet and JSP between process control and data sharing, and Web 
  Application should be how to configure and deploy. 

  Step 7, J2EE Programming 
  If the above process of learning is more successful, to carry out this step, the difficulty is suddenly increased.    Because of the knowledge content of the above are only one aspect, and like EJB, JMS, J2EE JTA core of the norms of several Java technology is often the integrated use of the crystal, so more difficult to grasp. 

  First we must study JNDI, JNDI is App Server location server resources (EJB components, Datasouce, 
  JMS) Find a way, if JNDI not familiar with the case, EJB, JMS almost of these things go.    JNDI is actually javax.naming .* This package is very simple to use.    What is difficult in the configuration file server resources.    The resource file server configuration, it is necessary to look at specific documentation standards, such as the wording of web.xml, ejb-jar.xml written, and so on.    For each different App Server, the service also has its own configuration file resources, but also need to know. 

  Then can learn JTA, it is most important to understand the affairs of JTA control methods, as well as the use of what occasions 
  JTA.    You can cite a simple example, we know that the general situation can be connected to a database transaction control (conn.setAutoCommit (false ),…., conn.commit ()), as an atomic operation, but I assume that the Business demand is necessary to the operation of two different database as an atomic operation, you can do that?    This time can only use the JTA.    First operating assumption that the process is inserted to a record A database, and then delete another B database records, write our own code it is impossible to control the whole operation as an atomic operation.    With the JTA, from App Server to complete control. 

  EJB in the study prior to learning of the target sequence and RMI, RMI is the basis of EJB.    EJB and JMS then learning to EJB 
  , The most crucial is to understand how the RMI EJB is to achieve the target of the remote call, and under what circumstances to use EJB. 

  End in learning EJB, JMS these things, you may be aware impatient to learn knowledge in the field of two, is a UML, and the other is Design Pattern.    Java enterprise software attaches great importance to the design of the framework (Framework) design, a good software, the software framework of the necessary conditions for successful development.    At this time, should begin to focus on the study of design patterns and framework of the study, through learning and the actual programming experience to grasp the EJB Design Patterns and J2EE 
  The core model. 

  J2EE standard inside, in addition to EJB, JMS, JTA, Servlet / JSP, there are many, many JDBC outside of the enterprise technology, 
  Here is not introduced one by one. 

  There is also a new field of Web Services.    Web Services also has no new things, like a binder, can unify different services provide a uniform interface calls, as a user, I was as long as service providers to my WSDL (services description), enough, I do not know the server service providers whether EJB components, or. Net components, or what CORBA components, or the other to achieve what, I do not need to know.    Web Services of the greatest places on the adoption of uniform service delivery and call, 
  Internet services for the entire share is a very exciting technology.    Web Services is still nothing like good books, but you can search through the information in the network the way to learn. 

  Java Learning Path (d) method chapter 

  Java as a programming language, is the best way to learn to write code.    When you learn after a class, you can write their own procedures for a simple example to run to see if there are any results, and then a few more calls like, look at the results, this is very intuitive to learn to type , and memory is very profound.    And should not meet the code-tune, you should think about if I do not see this writing, a change in approach, the pilot not try again.    Senator remember that learning programming which is a process of destruction, the book on the case, their study prepared by the Documentation example after running through constantly try to use different methods to achieve, and constantly try to undermine the structure of the code, see It will look at what the outcome.    Through such an approach, you will be very thorough grasp of the very proficient in Java. 

  For example, we wrote Hello World 

  Public class HelloWorld ( 
  Public static void main (String [] args) ( 
  System.out.println ( "Hello World"); 
  ) 
  ) 

  Many beginners is not to understand why this main method must be defined public static void 
  Main (String [] args), can not read?    I am just learning, including Java, they also have doubts.    Would like to know the answer?    Very simple, you change the main operating names to see if what was wrong, and then wrong information analysis; of the main public Qudiao, try, what was wrong; static can be removed operation; not know whether the main method of a must-String [] array to remove String [], [], int changed, or 
  String try; do not know whether to write the name of the args parameters, can be replaced by other names of the args to see how the results. 

  I first learning Java is the time to do so, the Hello World program has repeatedly changed its July 8 meeting, continuously running, 
  Analysis of the results, and finally completely understand why this is the main method of the definition. 

  In addition, I staic, public, private, Exception, try () catch () () finally started, and so on and so forth is not a Hendong are reference books to the successful operation of the example above, and then began to undermine it, and constantly in accordance with their own inside the doubt to be rewritten procedures to see whether or not running, operating out of what looks whether it is possible to achieve the desired results.    This is a relatively time, but an example of this procedure several times after repeated sabotage.    I related to this thorough knowledge of the conversation.    Sometimes deliberately write some erroneous code to run, see if we can achieve the desired operational errors.    This is the master programming and profound. 

  In particular, it is worth mentioning that there is a great JDK debugging functions - verbose 
  Java? Verbose 
  Javac? Verbose, as well as many other tools have this option JDK 
  - Verbose show up in orders in the process of implementation, JVM Class where all were loaded through these valuable debugging information, we can help in the implementation of the JVM in the process of what is done. 

  In addition, their own in the learning process, and writing a lot of this damage routines, there should be categorized awareness of preservation, work in a typical accumulation should be regularly organized routine, day after day, will have a its own code library.    Encountered similar problems, the code inside Copy & Paste, Search & Replace, like, greatly increasing development speed.    The ideal situation is that some generic routines themselves abstraction layer, forming a common class libraries, a good package.    It can be stronger on the reusability. 

  Therefore, I think that is not special needs routines, write their own destruction routines is the best example, if you own is on the code that they did not write it, I strongly recommend that you look at the Java JDK foundation class library source code.    Below in the JDK installation directory there will be a src.zip, will be untied to the whole integrity of the JDK foundation class library, which is the rt.jar 
  Java source code, you can refer to Sun is how to write Java programs, regulate what look like.    I am learning the Java Class Library, when some areas do not have a clear understanding of the time, or you want to understand more clearly the details of the operation, they often open the corresponding category of source code, source code to see through all The issues will be swept away. 

  Java Learning Path (5) resources chapter 

  1, http://java.sun.com/ (English) 
  Sun's Java site is a regular should look at the place.    Needless to say. 

  2, http://www-900.ibm.com/developerWorks/cn/ 
  IBM's developerWorks site, good English directly to the English site to see.    Here is not only an excellent object-oriented analysis and design websites, but also Web Services, Java, Linux excellent site.    Strongly recommended!    !    ! 

  3, http://www.javaworld.com/ (English) 
  Many new technologies on Java discussions and news.    Java would like to have a better understanding of all aspects of the application here is good. 

  4, http://dev2dev.bea.com.cn/index.jsp 
  BEA's developer forum, BEA as the most important App Server vendors, many unique techniques, in Weblogic done on the development of a friend not to be missed. 

  5, http://www.huihoo.com/ 
  Grey Fox dynamic site, a professional middleware site, though not professional Java Web site, but in J2EE Enterprise Application technology has a profound knowledge. 

  6, http://www.theserverside.com/home/ (English) 
  TheServerSide is a well-known specialized Java Server-side applications-oriented Web sites. 

  7 / 
  Java Research Organization, there are many excellent articles and the Java Directory, in particular in the JDO rich and articles. 

  8, http://www.cnjsp.org/ 
  JSP technology Web site, a considerable number of Java and articles and resources. 

  9, http://www.jdon.com/ 
  Jdon forum is a personal nature of the Chinese professional J2EE technology forums, in many Java-Chinese forum, Jdon 
  One is the technical content is very high, the quality is very good forum posts. 

  10, http://sourceforge.net/ 
  SourgeForge is a stronghold of open-source software, which also have very, very rich open-source Java-renowned software. 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • DotNetKicks
  • DZone
  • Netvouz
  • Propeller

Tags:

Releated Java Articles

Comments

Leave a Reply