Thanks to visit codestin.com
Credit goes to github.com

Skip to content

xyproto/java-ffi-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-ffi-example

Example use of FFI for Java >= 22.

Print the contents of results.txt using fopen, fgets and fclose from the system libc.

Building and running

Prerequisites

Set the JAVA_HOME environment variable to the Java installation path (needs to be Java version 22 or later).

For example, for macOS + homebrew + zsh: export JAVA_HOME=/opt/homebrew/Cellar/openjdk/22.0.1/.

make is also required.

Building

make

Running

make run

The contents of results.txt will then be printed, using fopen, fgets and fclose from the system libc.

References

Inspired by:

Which in turn was inspired by:

General info

  • Version: 1.0.0
  • License: CC0

About

Example use of FFI for Java >= 22

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published