简体   繁体   English

如何在 eclipse 中运行外部 jar 库

[英]how to run external jar library in eclipse

I have just installed eclipse IDE for java and i am unable to execute code from external libraries, i know that we can't execute library code from unnamed package into a named package file, So i've put them both in default package, now i am able to access file from my external JAR library but i'm not able to get through this error, stating cannot connect to VM and some other boot layer error and i have no idea how to get through this... I have just installed eclipse IDE for java and i am unable to execute code from external libraries, i know that we can't execute library code from unnamed package into a named package file, So i've put them both in default package, now我可以从我的外部 JAR 库访问文件,但我无法解决此错误,指出无法连接到 VM 和其他一些引导层错误,我不知道如何解决这个问题...

The error occurs because of me adding jar library files to MODULEPATH instead of CLASSPATH.发生错误是因为我将 jar 库文件添加到 MODULEPATH 而不是 CLASSPATH。 You have to add jar files to your CLASSPATH.您必须将 jar 文件添加到您的 CLASSPATH。 If you already add jar files to MODLEPATH you have to remove from there and add jar files to CLASSPATH as on: Error occurred during initialization of boot layer如果您已经将 jar 文件添加到 MODLEPATH 中,则必须从那里删除并将 jar 文件添加到 CLASSPATH 中: 启动层初始化期间发生错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM