SlideShare a Scribd company logo
1 of 1
HOẠT ĐỘNG CỦA JNI:
 Các phương thức JNI được đánh dấu bằng từ khóa
native.
 Các phương thức này được viết bằng C++ và biên
dịch ra thư viện liên kết động .so.
 Thư viện liên kết động được Load lên trong chương
trình Java bằng lời gọi hàm System.loadLibrary(…);.
 Trong khi chương trình Java có lời gọi tới hàm
native, máy ảo Java sẽ tìm kiếm trong thư viện động
xem hàm này đã được cài đặt chưa, sau đó các đối
tượng Java sẽ được chuyển thành C++ để thực hiện
lời gọi tói C++.

More Related Content

Viewers also liked

Cn柴狗的惡夢
Cn柴狗的惡夢Cn柴狗的惡夢
Cn柴狗的惡夢ICEO
 
Lou's Projects
Lou's ProjectsLou's Projects
Lou's Projectslpallay
 
Rachel Wolfe Photography Features
Rachel Wolfe Photography FeaturesRachel Wolfe Photography Features
Rachel Wolfe Photography FeaturesRachel Wolfe
 
Carl Sandburg / Discovery Community School going GREEN
Carl Sandburg / Discovery Community School going GREENCarl Sandburg / Discovery Community School going GREEN
Carl Sandburg / Discovery Community School going GREENdcslighthouse
 
Fashion central international april issue 2016
Fashion central international april issue 2016Fashion central international april issue 2016
Fashion central international april issue 2016fashioncentra pk
 
Sales PowerPoint PPT Content Modern Sample
Sales PowerPoint PPT Content Modern SampleSales PowerPoint PPT Content Modern Sample
Sales PowerPoint PPT Content Modern SampleAndrew Schwartz
 

Viewers also liked (9)

Cn柴狗的惡夢
Cn柴狗的惡夢Cn柴狗的惡夢
Cn柴狗的惡夢
 
Serial windows xp sp2
Serial windows xp  sp2Serial windows xp  sp2
Serial windows xp sp2
 
Gamify Your Class
Gamify Your ClassGamify Your Class
Gamify Your Class
 
Lou's Projects
Lou's ProjectsLou's Projects
Lou's Projects
 
Rachel Wolfe Photography Features
Rachel Wolfe Photography FeaturesRachel Wolfe Photography Features
Rachel Wolfe Photography Features
 
테스트3
테스트3테스트3
테스트3
 
Carl Sandburg / Discovery Community School going GREEN
Carl Sandburg / Discovery Community School going GREENCarl Sandburg / Discovery Community School going GREEN
Carl Sandburg / Discovery Community School going GREEN
 
Fashion central international april issue 2016
Fashion central international april issue 2016Fashion central international april issue 2016
Fashion central international april issue 2016
 
Sales PowerPoint PPT Content Modern Sample
Sales PowerPoint PPT Content Modern SampleSales PowerPoint PPT Content Modern Sample
Sales PowerPoint PPT Content Modern Sample
 

Hoạt động của jni

  • 1. HOẠT ĐỘNG CỦA JNI:  Các phương thức JNI được đánh dấu bằng từ khóa native.  Các phương thức này được viết bằng C++ và biên dịch ra thư viện liên kết động .so.  Thư viện liên kết động được Load lên trong chương trình Java bằng lời gọi hàm System.loadLibrary(…);.  Trong khi chương trình Java có lời gọi tới hàm native, máy ảo Java sẽ tìm kiếm trong thư viện động xem hàm này đã được cài đặt chưa, sau đó các đối tượng Java sẽ được chuyển thành C++ để thực hiện lời gọi tói C++.