无法找到或加载主类文件[复制](not able to find or load main class Files [duplicate])

编程入门 行业动态 更新时间:2024-10-27 03:41:56
无法找到或加载主类文件[复制](not able to find or load main class Files [duplicate])

这个问题在这里已经有了答案:

无法找到或加载主要的 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 answers

I'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\x64

will 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"

更多推荐

本文发布于:2023-08-03 17:05:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1395162.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   文件   find   load   duplicate

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!