# Linking ADABAS 6.6 with Java using  libadalnkx.s or libadalnk.s shared Library

**URL:** <https://techcommunity.softwareag.com/t/linking-adabas-6-6-with-java-using-libadalnkx-s-or-libadalnk-s-shared-library/201332>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-Code-Samples\
**Created:** [October 18, 2018, 2:05pm UTC](https://techcommunity.softwareag.com/t/linking-adabas-6-6-with-java-using-libadalnkx-s-or-libadalnk-s-shared-library/201332 "2018-10-18T14:05:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VINOTH\_SIVAKUMAR](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@VINOTH\_SIVAKUMAR](https://techcommunity.softwareag.com/u/VINOTH_SIVAKUMAR)\
**Post date:** [October 18, 2018, 2:05pm UTC](https://techcommunity.softwareag.com/t/linking-adabas-6-6-with-java-using-libadalnkx-s-or-libadalnk-s-shared-library/201332/1 "2018-10-18T14:05:14Z")

</div>

Can anyone provide code samples to invoke ADABAS from Java using the Shared Libraries libadalnkx.s or libadalnk.s . I am working on POC to migrate COBOL to Java where existing COBOL program interacts with ADABAS.

I am using JNA to invoke the the native libraries but getting error “Error looking up function”.

I tried to load libadalnkx using JNA then invoke method adalnkx.

public class Adabas {

```
public interface AdabasCSource extends Library{
	public void adalnkx();
}

public void callAdabas() {
	AdabasCSource cSource = (AdabasCSource) Native.loadLibrary("libadalnkx",AdabasCSource.class);
	cSource.adalnkx();
}

```

}

I know this is not right code sample but idea here is to use JNA to invoke Shared Library

---

<div class="post-metadata">

**Author:** ![Wayne\_Campos](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/wayne_campos/32/104_2.png) [@Wayne\_Campos](https://techcommunity.softwareag.com/u/Wayne_Campos)\
**Post date:** [October 19, 2018, 5:15am UTC](https://techcommunity.softwareag.com/t/linking-adabas-6-6-with-java-using-libadalnkx-s-or-libadalnk-s-shared-library/201332/2 "2018-10-19T05:15:31Z")

</div>

Your organization should look into purchasing the Adabas Client for Java.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:41pm UTC](https://techcommunity.softwareag.com/t/linking-adabas-6-6-with-java-using-libadalnkx-s-or-libadalnk-s-shared-library/201332/3 "2021-04-02T15:41:38Z")

</div>


