无法初始化类 com.sap.conn.jco.rt.JCoRuntimeFactory

发布于 2024-12-04 00:25:53 字数 161 浏览 0 评论 0原文

我收到错误

无法初始化类 com.sap.conn.jco.rt.JCoRuntimeFactory

我可以使用 glassfish 在 Windows Server 2003 64x 上运行使用 JCo 的应用程序,请帮忙!

I got the error

Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory

I can run my app that uses JCo on a Windows Server 2003 64x with glassfish, please help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情绪 2024-12-11 00:25:53

确保您安装了正确版本的 SAP JCo(即 Windows 64 位,而不是 32 位),并且 DLL 位于正确的位置。如果此本机库加载出现问题,Java 类将无法初始化。

Make sure you have the correct version of SAP JCo installed (i.e. Windows 64bit, not 32bit), and the DLL is in the correct location. If there is an issue with this native library loading, the Java class will not initialize.

哆兒滾 2024-12-11 00:25:53

就我而言,当我没有将 dll 复制到系统路径时,就会出现此问题。

转到 sapjco3.jar 附带的文档:
sapjco/javadoc/installation.html

Microsoft Windows
There are different distribution packages for various JRE versions and hardware processors available:
sapjco3-ntintel-3.1.7.zip for a 32-bit JRE running on a 32- or 64-bit AMD or INTEL x86 processor
sapjco3-ntamd64-3.1.7.zip for a 64-bit JRE running on a 64-bit AMD or INTEL x86 processor
Prerequisites: JCo 3.1 requires the Microsoft Visual Studio 2013 C/C++ runtime libraries to be installed on the system. If not present, download and install the latest version of the "Visual C++ 2013 Redistributable Package" from Microsoft and choose the package, which corresponds to the used Locale and JVM bit-width (x64 for 64-bit or x86 for 32-bit).
To install JCo for Windows unzip the appropriate distribution package into an own arbitrary directory {sapjco3-install-path}.
Note: Do not copy the sapjco3.dll neither into the {windows-dir}\system32 nor into the {windows-dir}\SysWOW64 directory. This will break the operability of other JCo versions that are already installed on the same system. Furthermore you would risk that the current installation also would not work anymore, if the sapjco3.dll gets replaced in the respective Windows system directory in the future.

Then add {sapjco3-install-path} to the PATH environment variable.
Finally, add {sapjco3-install-path}\sapjco3.jar to your CLASSPATH environment variable.

In my case this problem occured when I didn't copy dll to system path.

Go to documentation attached with sapjco3.jar :
sapjco/javadoc/installation.html

Microsoft Windows
There are different distribution packages for various JRE versions and hardware processors available:
sapjco3-ntintel-3.1.7.zip for a 32-bit JRE running on a 32- or 64-bit AMD or INTEL x86 processor
sapjco3-ntamd64-3.1.7.zip for a 64-bit JRE running on a 64-bit AMD or INTEL x86 processor
Prerequisites: JCo 3.1 requires the Microsoft Visual Studio 2013 C/C++ runtime libraries to be installed on the system. If not present, download and install the latest version of the "Visual C++ 2013 Redistributable Package" from Microsoft and choose the package, which corresponds to the used Locale and JVM bit-width (x64 for 64-bit or x86 for 32-bit).
To install JCo for Windows unzip the appropriate distribution package into an own arbitrary directory {sapjco3-install-path}.
Note: Do not copy the sapjco3.dll neither into the {windows-dir}\system32 nor into the {windows-dir}\SysWOW64 directory. This will break the operability of other JCo versions that are already installed on the same system. Furthermore you would risk that the current installation also would not work anymore, if the sapjco3.dll gets replaced in the respective Windows system directory in the future.

Then add {sapjco3-install-path} to the PATH environment variable.
Finally, add {sapjco3-install-path}\sapjco3.jar to your CLASSPATH environment variable.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文