Java learning from getting started to mastering

Source: Internet
Author: User
Java learning from getting started to mastering


Tool Article


One, JDK (Java Development Kit)




The
JDK is the core of the entire Java system, including the Java Runtime Environment (Java Runtime envirnment), a stack of Java tools and a Java-based class library (Rt.jar). No matter what Java application Server is in essence a version of the JDK is built in. So mastering the JDK is the first step in learning java. The most mainstream JDK is the JDK that Sun releases, and many companies and organizations, in addition to Sun, have developed their own JDK, such as the Jrocket of IBM's Jdk,bea company, the JDK developed by the GNU organization, and so on. IBM's JDK contains JVM (Java Virtual Machine) that is much more efficient than the JVM contained in the Sun JDK. The Jrocket, which runs on the x86 platform, is also much better at the server than the Sun JDK. But anyway, we need to get the sun JDK first.





1, JDK download and installation




The
JDK, also known as J2SE (Java2 SDK Standard Edition), can be downloaded from the Sun's Java Web site,





http://java.sun.com/j2se/downloads.html




The current version of the
JDK is j2sdk1.4.2, and it is recommended that you download this version of the JDK, download the page here:





http://java.sun.com/j2se/1.4.2/download.html





The downloaded JDK is an executable installer that installs a set of JRE (for browsers to use) under the C:\Program files\java\ directory after the default installation, and installs a set of JDK (also including a JRE) under C:\j2sdk1.4.2. Then we need to add the Java path C:\j2sdk1.4.2\bin to the front of the environment variable path. So the JDK is installed.





2, the JDK command tool




The most important command-line tool for
JDK:





java: Start JVM execution Class





Javac:java Compiler





Jar:java Packaging Tools





Javadoc:java Document Builder





These command lines must be very, very familiar and very proficient for each parameter. For the learning of these commands, the JDK documentation has detailed documentation.





II, JDK documentation





documentation also has a download link on the JDK download page, and it is recommended to download documentation at the same time. Documentation is the most important programming manual, covering all aspects of the entire Java description of the content. It can be said that learning Java programming, most of the time is spent looking at the documentation above. I was carrying, write Java code, at any time to view, a moment of the hand.





III, Application server (app servers)





APP Server is a platform for running Java Enterprise Components, which forms the main operating environment of the application software. The current mainstream app server is Bea's WebLogic server and IBM's WebSphere and free JBoss, choose one to learn from, and personally recommend WebLogic, because its architecture is cleaner, Development and deployment is more convenient, is the Java enterprise Software developers preferred development platform. The following is a brief introduction to several commonly used app servers:





1, Tomcat





Tomcat is not strictly a true app server, it's just a web container that can support running serlvet/jsp, but Tomcat also extends the functionality of some app servers, such as JNDI, database connection pooling, user transactions, and so on. Tomcat is very widely used in small and medium sized Java Web applications, so this article does a little bit of downloading, installing, and configuring Tomcat:





Tomcat is a subproject under the Jakarta Project under the Apache organization, and its main web site is:





http://jakarta.apache.org/tomcat/




The latest version of
Tomcat is Tomcat4.1.27, and the connection to the software download is:





http://www.apache.org/dist/jakarta/tomcat-4/binaries/





download Tomcat can either download the zip package directly, or download the EXE installation package (personal suggestion zip cleaner), in either case, download is finished after installation (Zip Direct decompression can be). Two environment variables need to be set:





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, turn off Tomcat run Shutdown.bat script. After Tomcat starts, 8080 ports are used by default, so you can use the browser to access





http://localhost:8080





to test whether Tomcat starts properly.





Tomcat provides administrative tools for two web interfaces, the URL being:





http://localhost:8080/admin/index.jsp





http://localhost:8080/manager/html





before enabling these two administrative tools, you need to manually configure the administrator user and password. Open Catalina_home\conf\tomcat-users.xml This 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"/>





so that the user "Robbin" has Super Administrator privileges. After you restart Tomcat, you can use the user to log on to the two administrative tools on the Web for Tomcat configuration and management.





2, BEA Weblogic





WebLogic can go to Bea's website for free to download to the latest Weblogic8.1 Enterprise Edition, license can use 1 years of free time, in fact, this is completely enough. WebLogic Download Connection: Http://commerce.bea.com/index.jsp,Weblogic's online documentation: http://edocs.bea.com/.





3, IBM webshpere





WebSphere can also be downloaded to a free trial version, and the IBM Developerworks Web site can see the downloads of WebSphere trial products and related WebSphere data. DeveloperWorks Chinese web site connection 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 that can be downloaded for free from the JBoss Web site: http://www.jboss.org/index.html, but JBoss's documentation is not free and needs to be purchased, so there are some hurdles for us to learn about JBoss. There are several good JBoss configuration documents on the Jdon that can be used for reference: http://www.jdon.com/idea.html





Four, Java application of the operating environment





Java application can be easily divided into the following areas:





1, Java Desktop Applications





desktop applications generally require only the support of the JRE is sufficient.





2, Java Web application





Java Web Applications require at least a JDK and a web container (such as Tomcat), as well as a multiuser database with at least three tiers of Web applications:





Browser layer: Browser display user page





Web layer: Running servlet/jsp





DB layer: Back-end database, providing data access services to Java programs





3, Java Enterprise-class application





Enterprise application is more complex, can be extended to n-tier, the simplest case will be divided into 4 layers:





Browser layer: Browser display user page





Client layer: Java Client graphics programs (or embedded device programs) interact directly with the Web layer or the EJB layer





Web layer: Running servlet/jsp





EJB layer: Run EJB, complete business logic operation





DB layer: Back-end database, providing data access services to Java programs





4, Java embedded application





Java Embedded application is a burgeoning field, engaged in embedded development, need to download the J2ME development package from the Sun, J2ME contains the embedded device dedicated virtual machine KVM, and the common JDK included in the JVM is different. There is also a need to download the simulator to a specific embedded vendor.











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.