更新时间:2023-11-19 08:05:19
仅指定目录不会将该目录中的jar文件添加到类路径中.您必须像这样将jar文件显式添加到您的类路径-
Specifying just a directory does not add the jar files in that directory to the classpath. You must add the jar file explicitly to your classpath like so --
E:\app\malisa\product\11.2.0\dbhome_1\jdbc\lib\ojdbc.jar
或者,如果您想添加多个jar文件,则可以使用这样的通配符
Or if you want to add multiple jar files, then you could use wildcards like this
E:\app\malisa\product\11.2.0\dbhome_1\jdbc\lib\*
看看如何在Java中设置类路径7 .