在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:jnr/jnr-ffi开源软件地址:https://github.com/jnr/jnr-ffi开源编程语言:Java 97.7%开源软件介绍:JNR-FFIJNR-FFI is a Java library for loading native libraries without writing JNI code by hand, or using tools such as SWIG. InstallationApache Maven: <dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-ffi</artifactId>
<version>x.y.z</version>
</dependency> Gradle Kotlin: implementation("com.github.jnr:jnr-ffi:x.y.z") Gradle Groovy: implementation 'com.github.jnr:jnr-ffi:x.y.z' Exampleimport jnr.ffi.LibraryLoader;
public class HelloWorld {
public interface LibC { // A representation of libC in Java
int puts(String s); // mapping of the puts function, in C `int puts(const char *s);`
}
public static void main(String[] args) {
LibC libc = LibraryLoader.create(LibC.class).load("c"); // load the "c" library into the libc variable
libc.puts("Hello World!"); // prints "Hello World!" to console
}
} View more details in our user documentation. LICENSE
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论