cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with SAP Java Connector (JCo) in Eclipse

vfalseth
Explorer
0 Kudos

Hi all!

I use Eclipse (with ADT) for ABAP development. However, I’ve been having problems with Eclipse since last week. After starting, Eclipse shows an error related to SAP Java Connector (sapjco).

I’ve done some tests with “sapjco 3.1.7” using the jar file. The results are shown below:

JRE 64 bits

  • sapjco.dll (32 bits): "\eclipse_2022_09\configuration\org.eclipse.osgi\274\0.cp\lib\sapjco3.dll: Can’t load IA 32-bit .dll on a AMD 64-bit platform"

  • sapjco.dll (64 bits): "\eclipse_2022_09\configuration\org.eclipse.osgi\274\0.cp\lib\sapjco3.dll: %1 is not a valid Win32 application"

JRE 32 bits

  • sapjco.dll (32 bits): it worked

  • sapjco.dll (64 bits): "\eclipse_2022_09\configuration\org.eclipse.osgi\274\0.cp\lib\sapjco3.dll: %1 is not a valid Win32 application"

The only way is to use a JRE 32 bits but Eclipse requires JRE 64 bits. What can I do in this case?

Thanks in advance.

HAL9000
Product and Topic Expert
Product and Topic Expert
0 Kudos

It is not clear to me what you are trying to do here? ADT already comes with JCo and you don't need to install another JCo version on your own for the ABAP Development Tools and developüing in ABAP.

Are you saying that ADT does not start or work correctly anymore although you did not install JCo 3.1.7 on your own?

vfalseth
Explorer
0 Kudos

Hi Stefan,

ADT is not starting correctly with the JCo that is provided with it. Because of that, I've downloaded JCo 3.1.7 and I've done some tests using the jar file. I've also tried to replace the original sapjco.dll with the other version (3.1.7) in the Eclipse lib directory. Unfortunately, it didn't work.

Error message:

JCo initialization failed with java.lang.UnsatisfiedLinkError: C:\Users\software\eclipse_2022_09\configuration\org.eclipse.osgi\274\0\.cp\lib\sapjco3.dll: %1 is not a valid Win32 application

HAL9000
Product and Topic Expert
Product and Topic Expert
0 Kudos

Note that JCo cannot be loaded twice in one process. I would recommend to remove the downloaded and installed JCo in any case.

vfalseth
Explorer
0 Kudos

Hi Stefan,

JCo is not installed on my system and I haven't configured any environmental variables for it. I've put it in a separate directory that is only for doing tests.

Accepted Solutions (1)

Accepted Solutions (1)

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

One possible cause for the error "%1 is not a valid Win32 application" is, that you installed only the 32bit Microsoft Visual C/C++ Runtime and not the 64bit version. This would explain, why the 32bit sapjco.dll with 32bit Java VM works, while 64bit sapjco.dll with 64bit Java VM doesn't.

The 64bit JCo 3.1 requires the 64bit version of Microsoft Visual C/C++ Runtime 2013. You can check in "Add or Remove Programs", whether it is already installed, and if not, download it from here:

https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

vfalseth
Explorer

It worked after installing Microsoft Visual C/C++ Runtime 2013(x64). Thanks a lot.

Answers (2)

Answers (2)

vfalseth
Explorer
0 Kudos

Hi Ulrich,

I have Microsoft Visual C/C++ Runtime 2013(x86) and Microsoft Visual C/C++ Runtime 2015-2022(x64 and x86) on my computer. I’ll install Microsoft Visual C/C++ Runtime 2013(x64). I’ll update this question after installing the new version. Thanks for your tip.

HAL9000
Product and Topic Expert
Product and Topic Expert
0 Kudos

Yes, that explains it. Microsoft Visual C/C++ Runtime 2013(x64) must be installed for the 64-bit JCo 3.1 version.

HAL9000
Product and Topic Expert
Product and Topic Expert
0 Kudos

Please see https://tools.hana.ondemand.com/#abap and check if you fulfill the prerequisites for installing ADT.
Especially pay attention to the eclipse version and the used JRE, which should either be version 11 or 17 in 64-bit.

If that doesn't help, and no one else has some other idea, I suggest to create a SAP support case for your issue.

vfalseth
Explorer
0 Kudos

I have JRE 17 in 64-bit. I've tried with two Eclipse versions: 2022-12 and 2023-03.

vfalseth
Explorer
0 Kudos

It worked after installing Microsoft Visual C/C++ Runtime 2013(x64). Thanks for your tips.

HAL9000
Product and Topic Expert
Product and Topic Expert
0 Kudos

In the linked prerequisites, it says that Microsoft Visual C/C++ Runtime 2013(x64) must be installed. 😉