flybywire
flybywire

Reputation: 273472

Do you know of a Java library to access the native linux api?

Do you know of a Java library to access the native linux api?

I guess something like this must use JNI. So be it.

Upvotes: 2

Views: 2087

Answers (4)

Steve K
Steve K

Reputation: 19586

Have a look at JNA.

Here is the summary of JNA from their home page.

JNA provides Java programs easy access to native shared libraries (DLLs on Windows) without writing anything but Java code—no JNI or native code is required. This functionality is comparable to Windows' Platform/Invoke and Python's ctypes. Access is dynamic at runtime without code generation.

See their getting started page for some samples. Like calling native printf.

Upvotes: 4

Jon Skeet
Jon Skeet

Reputation: 1500215

SWIG makes life easier than "raw" JNI with javah etc.

Upvotes: 0

TofuBeer
TofuBeer

Reputation: 61526

jtux might help depending on what you want to do.

Upvotes: 1

oxbow_lakes
oxbow_lakes

Reputation: 134270

You can use: Runtime.exec to execute anything you want...

Upvotes: 0

Related Questions