[英]How can I see which native dll's are loaded by the JVM?
我正在IntelliJ中調試應用程序,並且JVM抱怨libpng的版本:
QSystemTrayIcon::setVisible: No Icon set
libpng warning: Application was compiled with png.h from libpng-1.4.0
libpng warning: Application is running with png.c from libpng-1.2.46
libpng error: Incompatible libpng version in application and library
我想檢查在我的Java程序執行期間正在加載哪個libpng文件(即文件的完整路徑)。 我怎樣才能做到這一點?
下一個問題是:我如何確保它加載libpng版本1.4.0(它在我的系統上,但是顯然它首先找到libpng 1.2.46)。
在Unix上,您可以查看所有映射。 如果加載了共享庫,則可以在/proc/{pid}/maps
下看到它,例如
address perms offset dev inode pathname
08048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm
08056000-08058000 rw-p 0000d000 03:0c 64593 /usr/sbin/gpm
08058000-0805b000 rwxp 00000000 00:00 0
40000000-40013000 r-xp 00000000 03:0c 4165 /lib/ld-2.2.4.so
40013000-40015000 rw-p 00012000 03:0c 4165 /lib/ld-2.2.4.so
4001f000-40135000 r-xp 00000000 03:0c 45494 /lib/libc-2.2.4.so
40135000-4013e000 rw-p 00115000 03:0c 45494 /lib/libc-2.2.4.so
4013e000-40142000 rw-p 00000000 00:00 0
bffff000-c0000000 rwxp 00000000 00:00 0
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.