1.classpath
指向编译好jar包(或则其他java类包)所在的位置
2.java.library.path
1.动态库所在位置,在windows中是dll文件,在linux中是so文件,不是jar包路径
2.输出所有动态库所在路径(不止是java的):System.out.println(System.getProperty('java.library.path'));
下面是一部分
/*C:\Program Files\Java\jdk1.8.0_202\bin;
C:\Windows\Sun\Java\bin;C:\Windows\system32;
C:\Windows;D:\NetSarang\Xftp 6\;
D:\NetSarang\Xshell 6\;
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
C:\Windows\system32;C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Windows\System32\OpenSSH\;
C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;
D:\Microsoft VS Code\bin;
D:\Polyspace\R2019a\runtime\win64;
D:\Polyspace\R2019a\bin;
D:\Polyspace\R2019a\polyspace\bin;
C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;
C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;
C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;
C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;
C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;
D:\nodejs\;
......*/
View Code
java运行时就会从这些路径下寻找动态库
3.解决no XXX in java.library.path
即在上面列出的动态库路径中没有所需的动态库文件
1.将动态库文件复制到上面路径之一中
2.手动给出路径
-Djava.library.path=动态库文件路径
4.手动添加jar包路径
鼠标右键,手动添加jar包目录
然后在项目结构的Libraries中可以看到
这些是项目所使用的所有jar包目录