Real Java learning from getting started to proficient

Source: Internet
Author: User
Tags ibm developerworks

I. Tools 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, there are also many companies and organizationsDevelopmentJDK, such as JDK developed by IBM, Jrocket developed by 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 ).WebsiteDownload,Http://java.sun.com/j2se/downloads.htmlThe latest JDK version is J2SDK1.4.2. We recommend that you download JDK of this version. The download page is here: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 importantProgrammingThe manual covers 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 subproject under the Jakarta project under the Apache organization. Its main website is:Http://jakarta.apache.org/tomcat/The latest version of Tomcat is Tomcat 4.1.27. The connection to software download 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, so it can be accessed through a browser.Http: // localhost: 8080To test whether Tomcat is started normally.

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:

<Role rolename = "manager"/>

<Role rolename = "admin"/>

<User username = "robbin" password = "12345678" roles = "admin, manager, tomcat"/>

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 connection:Http://commerce.bea.com/index.jsp,.../Edocs.bea.com /.

3. IBM Webshpere

Websphere can also be downloaded to a free trial version. You can see a trial of Websphere on the IBM developerWorks website.ProductThe link to the developerWorks Chinese website is:Http://www-900.ibm.com/developerWorks/cn/wsdd/, Websphere download connection:Http://www7b.software.ibm.com/wsdd/...WASsupport.html.

4. Jboss

Jboss is a free and open-source App Server. It can be downloaded from the Jboss website for free:Http://www.jboss.org/index.html, However ...n.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 ClientGraphicsPrograms (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.

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 to introduce Java syntax, object-oriented features, core class libraries and so on in a more complete and orderly manner.

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.