Java learning methods from getting started to proficient

Source: Internet
Author: User

Java Learning Path (1), tools
I. JDK (Java Development Kit)

JDK is the core of the entire Java, including the Java Runtime Environment (Java Runtime Envirnment), a bunch of Java tools and the Basic Java class library (rt. jar ). No matter what Java application server is actually built into a certain version of JDK. Therefore, mastering JDK is the first step to learn Java well. The most popular JDK is the JDK released by Sun. In addition to Sun, many companies and organizations have developed their own JDK, such as JDK developed by IBM and Jrocket of BEA, and JDK developed by GNU. Among them, the JVM (Java Virtual Machine) Running Efficiency of ibm jdk is much higher than that of Sun JDK. The Jrocket running on the x86 platform is much more efficient on the server than Sun JDK. However, we still need to Master Sun JDK first.

1. Download and install JDK
JDK is also called J2SE (Java2 SDK Standard Edition), can be downloaded from Sun's Java website, http://java.sun.com/j2se/downloads.html, JDK is currently the latest version of J2SDK1.4.2, it is recommended to download this version of JDK, download the page at http://java.sun.com/j2se/1.4.2/download.html.

The downloaded JDK is an executable installation Program. After the installation is completed by default, a set of JRE (for use by browsers) will be installed in the C: Program FilesJava directory. In C: install a JDK (including a JRE) under j2sdk1.4.2 ). Then we need to add the java path c: j2sdk1.4.2in at the beginning of the Environment Variable PATH. In this way, JDK is installed.

2. JDK command tools
JDK's most important command line tool:
Java: Start JVM to execute class
Javac: Java compiler
Jar: Java packaging Tool
Javadoc: Java document Builder
These command lines must be very familiar with each parameter. JDK Documentation provides detailed documents on how to learn these commands.


Ii. JDK Documentation

Documentation is also available on the JDK download page. We recommend that you download Documentation at the same time. Documentation is the most important programming manual, covering the description of all aspects of Java. It can be said that the majority of the time spent learning Java programming is spent reading this Documentation. I carry it with me. When I write Java code, I can check it at any time.


3. App Server)

App Server is a platform for running Java Enterprise components and forms the main runtime environment of application software. Currently, the mainstream App Server is BEA's Weblogic Server, IBM's Websphere, and free Jboss. You can select one of them for learning. I personally recommend Weblogic, because of its clean architecture and convenient development and deployment, it is the preferred development platform for Java Enterprise software developers. The following describes several common App servers:

1. Tomcat
Tomcat is not a real App Server in a strict sense. It is just a Web container that supports running Serlvet/JSP. However, Tomcat also extends some App Server functions, such as JNDI, database Connection Pool, user transaction processing, and so on. Tomcat is widely used in small and medium-sized Java Web applications. Therefore, this article introduces how to download, install, and configure Tomcat:

Tomcat is a sub-project under the Jakarta project under the Apache organization, its main website is: http://jakarta.apache.org/tomcat/, Tomcat latest version is Tomcat4.1.27, software download connection is: http://www.apache.org/dist/jakarta/tomcat-4/binaries.

To download Tomcat, you can download both the zip package and the exe installation package (I suggest you clean the zip file). In either case, after the download and installation are complete (you can decompress the zip file directly ). You need to set two environment variables:

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

After installation, start Tomcat to run CATALINA_HOMEinstartup.bat and close Tomcat to run the shutdown. bat script. After Tomcat is started, port 8080 is used by default. Therefore, you can use a browser to access http: // localhost: 8080 to test whether Tomcat is started properly.

Tomcat provides two management tools on the Web interface. The URLs are:
Http: // localhost: 8080/admin/index. jsp
Http: // localhost: 8080/manager/html
Before enabling these two management tools, you must manually configure the administrator user and password. Open the CATALINA_HOMEconfomcat-users.xml file with a text tool and add the following lines:

 
 
 

In this way, the user "robbin" has the super administrator permission. After you restart Tomcat, you can use the user to log on to the two management tools above and configure and manage Tomcat on the Web.

2. BEA Weblogic
Weblogic can download the latest Weblogic8.1 Enterprise Edition After free registration on the BEA website. License can be used for free for one year. In fact, this is enough. Weblogic download link: http://performance.bea.com/index.jsp, weblogic's on-line document: http://edocs.bea.com /.

3. IBM Webshpere
Websphere can also download to the free trial version, to IBM's developerWorks website can see the download of Websphere trial products and related Websphere information, the link of the Chinese site of developerWorks is: http://www-900.ibm.com/developerWorks/cn/wsdd, websphere download connection: http://www7b.software.ibm.com/wsdd/downloads/WASsupport.html.

4. Jboss
Jboss is a free and open-source App Server. It can be downloaded from the Jboss website for free: Ghost. There are several good Jboss configuration documents on Jdon, can be used for reference: http://www.jdon.com/idea.html


Iv. Java application Runtime Environment

Java applications can be divided into the following aspects:

1. Java Desktop applications
Desktop applications generally require only JRE support.

2. Java Web Applications
Java Web applications must install JDK, a web Container (such as Tomcat), and a multi-user database. Web applications must be divided into at least three layers:
Browser layer: displays the user page in the Browser.
Web layer: Run Servlet/JSP
DB layer: backend database that provides data access services to Java programs

3. Java Enterprise Applications
Enterprise applications are complex and can be extended to layer n. The simplest case is divided into four layers:
Browser layer: displays the user page in the Browser.
Client layer: Java Client graphics programs (or embedded device programs) directly interact with the Web layer or EJB Layer
Web layer: Run Servlet/JSP
EJB layer: runs EJB to complete business logic operations
DB layer: backend database that provides data access services to Java programs

4. Java embedded applications
Java embedded applications are an emerging field. They are engaged in Embedded Development and need to download the j2's development kit from Sun. j2's includes the dedicated virtual machine KVM for embedded devices, which is different from the JVM contained in the general JDK. You also need to download the simulator from a specific embedded vendor.


Java Learning Path (2), books

It is impossible to read only one or two books to learn a new knowledge. A step-by-step reading process is required. I recommend the Java series books published by Oreilly.

Here I just want to add one point. Many people start with Thinking in Java, but I think this book is not suitable for beginners. I think the correct way to use this book should be as an auxiliary reader. Thinking in Java is not a complete introduction to the entire Java system, but a leaping writing method, it is a method similar to tips to deeply analyze and explain many Java knowledge points.

For beginners, it is best to find a book on getting started with Java, but it introduces Java syntax, object-oriented features, core class libraries, and so on in sequence. while reading this book, let's take a look at Thinking in Java to deepen our understanding of Java and how it works. At the same time, we can fully understand the entire Java System.

For getting started books on Java, Cai xuexiao recommends Oreilly's cutting ing Java, 2nd Edition, or Java in a Nutshell, 2nd Edition (for C ++ background). I have not read these two books. In fact, I think the Electronic Industry Press's "Java 2 programming details" or "Java 2 from entry to mastery" is very good.

Among all the Java books, the most useful is not Oreilly's Java Serials. The most useful is JDK Documentation! Almost all the knowledge you want to obtain is available in Documentation. The most important part is the API Documentation of the Java basic class library, which is organized by package, each class has a detailed explanation, its inheritance relationship, whether an interface is implemented, and where can all its public attributes and methods be found, the interpretation and meaning of each attribute, the purpose of each method, the called parameter, the meaning of the parameter, the type of the returned value, and the exceptions that the method may throw. In this way, all the books on Java programming are actually just in a relatively easy-to-understand language, and a good way to introduce the usage of some classes in a package in Documentation. As a result, if you have enough ability to directly learn Java class libraries through Documentation, you do not need to read other books. In addition, Documentation is

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.