1 / 17

Giới thiệu, cú pháp, môi trường

Giới thiệu, cú pháp, môi trường. Nguyễn Văn Khiết. Nội dung. Giới thiệu Cú pháp Các điểm đáng chú ý Môi trường. Nội dung môn học. Ngôn ngữ, cú pháp, môi trường Java IO Swing JDBC Java và tiếng Việt Multithread Hibernate Java & XML Java ant Java applet JUnit Java Networking

Télécharger la présentation

Giới thiệu, cú pháp, môi trường

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Giới thiệu, cú pháp, môi trường Nguyễn Văn Khiết

  2. Nội dung • Giới thiệu • Cú pháp • Các điểm đáng chú ý • Môi trường

  3. Nội dung môn học • Ngôn ngữ, cú pháp, môi trường • Java IO • Swing • JDBC • Java và tiếng Việt • Multithread • Hibernate • Java & XML • Java ant • Java applet • JUnit • Java Networking • Java RMI • Design Patterns

  4. Điều kiện tiên quyết • Kiến thức lập trình hướng đối tượng • Sử dụng tốt các cấu trúc dữ liệu.

  5. Giới thiệu • Java : language ? platform • Java 2 platform : • Java 2 Standard Edition (J2SE) • Java 2 Micro Edition (J2ME) • Java 2 Enterprise Edition (J2EE)

  6. Đặc điểm của java • Object oriented • Architecture neutral, portable • Robust • Secure • Dynamic

  7. Giới thiệu (tt) • Các loại ứng dụng • Standalone application • Applet • Servlet/JSP • EJB/J2EE

  8. Cú pháp • Tham khảo Java Language Specification http://java.sun.com/docs/books/jls/second_edition/html/jTOC.doc.html • Tham k

  9. J2SDK • Bộ công cụ cho java software developer được gọi là Java Development Kit (JDK) • Từ version 1.2, bộ toolkit này được đổi tên thành Java 2 Software Developer Kit (J2SDK)

  10. J2SDK • javac • java • appletviewer • jar • jdb • …

  11. Cấu trúc chương trình java //Hello.java // package example; import java.util.*; public class Hello { public static void main(String[] args) { System.out.println("Hello, to day : "); System.out.println(new Date()); } }

  12. Biên dịch và thực thi • Biên dịch javac Hello.java • Thực thi java Hello

  13. Cách thức launcher tìm class • Lệnh java tìm kiếm các file bytecode theo tên lớp • Nếu lớp thuộc về 1 package, thì lớp phải nằm trong một thư mục cùng tên với package. Phải chi rõ tên package khi dùng lệnh java VD: java p1.MyClass

  14. Cách thức launcher tìm class • Việc tìm và load các lớp theo thứ tự: • Các lớp thuộc java core API (trong file rt.jar trong thư mục jre\lib) • Các gói mở rộng của java platform • User class

  15. CLASSPATH • Để tìm user class, launcher sẽ dựa vào classpath. • Xác định classpath • bằng tham số -cp của lệnh java • Dùng biến môi trường CLASSPATH

  16. Môi trường • NetBeans • Eclipse • …

  17. Resources • java.sun.com • Java docs • Java support forum : supportforum.sun.com • Java tutorial • …

More Related