Java learning from getting started to proficient
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 the browser) will be installed in the C:/program files/Java/directory. In C: /j2sdk1.4.2 install a set of JDK (including a set of JRE ). Then we need to add the Java path C:/j2sdk1.4.2/bin 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:/tomcat4 (your tomcat installation directory)
After installation, start Tomcat to run catalina_home/bin/startup. 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_home/CONF/tomcat-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 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.