Trước khi bắt đầu vào luyện tập các ví dụ sử dụng SWT, chúng ta nên import thư viện SWT vào workspace của Eclipse.
Link Download
Version Windows x86: http://archive.eclipse.org/eclipse/d…-win32-x86.zip
Version Windows x64: http://www.eclipse.org/downloads/dow…n32-x86_64.zip
Hướng dẫn import SWT vào Eclipse
– Chọn Properties (Alt+Enter) của project SWT
– Chọn Java Build Path, sau đó chọn tab Libraries và làm theo các bước như trong hình sau:
– Đặt tên cho biến môi trường là SWT_LIB (tùy biến) và chỉ đường dẫn tới thư mục lưu thư viện SWT.
Chú ý: Path là đường dẫn lưu file thư viện SWT (đã download ở trên). Nếu project không tìm thấy thư viện, báo lỗi “the import org.eclipse cannot be resolved”. Bạn phải chỉ định đến file swt.jar nằm trong thư mục chứa thư viện SWT
Tới đây, chúng ta hoàn thành việc import thư viện SWT trên eclipse
Leave a Reply
You must be logged in to post a comment.