Java and C/C++ Interoperability: Java Integration to Windows Event Log - TechRepublic

Java and C/C++ Interoperability: Java Integration to Windows Event Log

Last Updated: February 12, 2022 Format: PDF

SUN Java provides a mechanism for integration with functions coded in C/C++ or assembler, and basically offers two frameworks: Java Native Interface (JNI), and Java Native Access (JNA). In this paper, each of these two frameworks are first described, and then JNI is demonstrated with an example code, which uses Java code to write to the windows event log through code written in C/C++. Event log is a standard windows OS feature and is used to log messages. Java usually does not use windows event log to log messages, but in cases when it is necessary, this example demonstrates how it can be achieved.

Explore More Resources

Search Resources

Search to explore resources