# plugin -\> call java

**URL:** <https://techcommunity.softwareag.com/t/plugin-call-java/60142>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux, Natural-on-Windows-Unix\
**Created:** [September 6, 2005, 9:40pm UTC](https://techcommunity.softwareag.com/t/plugin-call-java/60142 "2005-09-06T21:40:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Linn](https://avatars.discourse-cdn.com/v4/letter/l/ba9def/32.png) [@Linn](https://techcommunity.softwareag.com/u/Linn)\
**Post date:** [September 6, 2005, 9:40pm UTC](https://techcommunity.softwareag.com/t/plugin-call-java/60142/1 "2005-09-06T21:40:17Z")

</div>

Hi,  
is it possible to call an external (Java-)program from within a Natural plugin ???  
If yes, how can i do that ?  
Thanks

---

<div class="post-metadata">

**Author:** ![Chad\_Scott](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Chad\_Scott](https://techcommunity.softwareag.com/u/Chad_Scott)\
**Post date:** [September 6, 2005, 9:52pm UTC](https://techcommunity.softwareag.com/t/plugin-call-java/60142/2 "2005-09-06T21:52:05Z")

</div>

It would be possible to invoke the external program, but I’m not sure if there could be any type of interaction between them (windows clipboard maybe?). That type of functionality may be where developing a plugin using the other interfaces (VB or C++) would come in to play.

---

<div class="post-metadata">

**Author:** ![BenedictXVII](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@BenedictXVII](https://techcommunity.softwareag.com/u/BenedictXVII)\
**Post date:** [September 16, 2005, 6:41pm UTC](https://techcommunity.softwareag.com/t/plugin-call-java/60142/3 "2005-09-16T18:41:56Z")

</div>

By combining the native call interfaces of Natural and Java it is possible to bridge between the two. The general direction is writing a user library in C (see the documentation of the Natural CALL statement in the Statements Manual) and from this library instantiating a Java class and calling its methods through the Java Native Interface JNI (see for instance [JDK 19 Documentation - Home](http://java.sun.com/j2se/1.4.2/docs/guide/jni/index.html)). If you are interested in direct access from Natural to Java, it might be a good idea to submit an official enhancement proposal.

---

<div class="post-metadata">

**Author:** ![BenedictXVII](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@BenedictXVII](https://techcommunity.softwareag.com/u/BenedictXVII)\
**Post date:** [September 16, 2005, 6:49pm UTC](https://techcommunity.softwareag.com/t/plugin-call-java/60142/4 "2005-09-16T18:49:38Z")

</div>

Oops, there was a small accident with the URL: It’s [JDK 19 Documentation - Home](http://java.sun.com/j2se/1.4.2/docs/guide/jni/index.html)

---

<div class="post-metadata">

**Author:** ![Chad\_Scott](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Chad\_Scott](https://techcommunity.softwareag.com/u/Chad_Scott)\
**Post date:** [September 19, 2005, 8:57pm UTC](https://techcommunity.softwareag.com/t/plugin-call-java/60142/5 "2005-09-19T20:57:29Z")

</div>

Another possible option could be to look at using the ActiveX bridge, documentation is at:

> **[JDK 19 Documentation - Home](https://docs.oracle.com/en/java/javase/19/)**
>
> The documentation for JDK 19 includes developer guides, API documentation, and release notes.

Please let me (us?) know if/how you end up solving this.

Thanks,  
Chad.

---

<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, 2:40pm UTC](https://techcommunity.softwareag.com/t/plugin-call-java/60142/6 "2021-04-02T14:40:16Z")

</div>


