2

it is a simple question how can i access a method which is written in C language by a java application.

Sanjay Kumar
  • 369
  • 6
  • 23

1 Answers1

3

You options include:

Java Native Interface
see: https://en.wikipedia.org/wiki/Java_Native_Interface

quote:

JNI enables programmers to write native methods to handle situations when an application cannot be written entirely in the Java programming language, e.g. when the standard Java class library does not support the platform-specific features or program library

Java Native Access

see: https://en.wikipedia.org/wiki/Java_Native_Access

quote:

Java Native Access is a community-developed library that provides Java programs easy access to native shared libraries without using the Java Native Interface.

JNR-FFI

see: https://github.com/jnr/jnr-ffi

quote:

jnr-ffi is a java library for loading native libraries without writing JNI code by hand, or using tools such as SWIG.

Dawnkeeper
  • 2,844
  • 1
  • 25
  • 41