Crazy idea: connect to .NET and SAP using SAP JCo using IKVM.NET

Since the SAP Console for .NET is no longer supported by SAP, I am now looking for an alternative to connect the Microsoft world to the SAP world. I know that there are third-party products, such as "ERPConnect", but I want to do this using tools from SAP (by the way, I can not use Enterprise Services , because the target SAP system is SAP 4.6C ). So there was a crazy idea to use the SAP Java Connector in combination with the IKVM.NET tool (www.ikvm.net/devguide/net2java.html). IKVM.NET provides an IKVMC tool that converts Java bytecode to .NET dll and exe. "No sooner said than done!" I converted the SAP JCo DLL to .NET and created a new Visual Studio solution. I put all the JCO files in a subdirectory of my solution. I installed 2 links to the generated IKVM.OpenJDK.Core.dll and sapjco.dll files. Great, all the JCO classes that are now available as .NET classes. Full of optimism I wrote some code to connect to the SAP system.

JCO.Client client = null; client = JCO.createClient (...)

There were no errors compiling my test code. "Wonderful!" I thought. Then I started using the tetstapplication method. Unfortunately, I have an exception that throws JCO.createClient:

Failed to load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC' \ r \ nno sapjcorfc in java.library.path

I have 2 questions on this topic.

1) Do you think my idea of ​​using the SAP Java Connector (SAP JCo) to connect .NET with SAP is a good idea or is this nonsense? Maybe someone had the same idea :-)

2) How can the above exception be resolved?

+7
java sap ikvm
source share
5 answers

1) I do not think this approach is a good idea. The actual connection to sap is not from java (or from .net in the old .net connector). But from c dll name, librfc32.dll. I believe that IKVM JNI support is not complete.

It may work, but it will even be fragile.

+4
source share

I would not recommend this way! You must use the direct path. For example, you can use the SAP RFC SDK.

+1
source share

SAP.Net Connector 3 released . I use it at work every day ...

+1
source share

I think that you share a look at web services, it will be easier and more flexible.

Hi

0
source share

This sound is similar to the IKVM classloader issue. Take a look at the description on the wiki .

0
source share

All Articles