这个问题在这里已经有了答案:
无法找到或加载主要的 16 级 答案我正在尝试构建一个简单的jdbc数据库调用应用程序。 我有buildpath中的jar,而我的sqljdbc_Auth.dll位于该文件夹中:
C:\ Program Files(x86)\ jdbc \ sqljdbc_4.0 \ enu \ auth \ x64
我收到此错误消息
错误:无法找到或加载主类文件
我的虚拟机参数:看起来像这样...
-Djava.library.path = C:\ Program Files(x86)\ jdbc \ sqljdbc_4.0 \ enu \ auth \ x64
这就是我迄今所知道的。 加载sqljdbc_auth.dll文件比涉及更多的java.library.path ?
This question already has an answer here:
Could not find or load main class 16 answersI'm trying to build a simple jdbc database call application. I have the jars in the buildpath and and my sqljdbc_Auth.dll is in the folder:
C:\Program Files (x86)\jdbc\sqljdbc_4.0\enu\auth\x64
I'm getting this error message
Error: Could not find or load main class Files
my VM arguments: looks like this...
-Djava.library.path=C:\Program Files (x86)\jdbc\sqljdbc_4.0\enu\auth\x64
And that's what I know so far. Is loading the sqljdbc_auth.dll file in the java.library.path more involved than that?
最满意答案
这听起来像你正在使用Eclipse。 这个:
-Djava.library.path=C:\Program Files (x86)\jdbc\sqljdbc_4.0\enu\auth\x64将被解析为多个参数,因为它中有空格。我对Windows不是很熟悉,但是您可能需要将其替换为如下所示的内容:
"-Djava.library.path=C:\Program Files (x86)\jdbc\sqljdbc_4.0\enu\auth\x64"It sounds like you are using Eclipse. This:
-Djava.library.path=C:\Program Files (x86)\jdbc\sqljdbc_4.0\enu\auth\x64will be parsed as multiple arguments, because it has spaces in. I'm not very familiar with Windows, but you probably need to replace it with something like this:
"-Djava.library.path=C:\Program Files (x86)\jdbc\sqljdbc_4.0\enu\auth\x64"更多推荐
发布评论