Rogério Garibalde Miranda wrote:
> 
> How can I make a call to an API of the linux using java? I want to add an
> user to the linux, for example. thank you.
> 
> Rogerio G Miranda

If you want to call native C/C++ APIs, you'll need to use the Java
Native Interface to write a native method that accepts arguments from
Java, converts them as needed, and makes the API calls.

If you want to run Linux programs, you can do that with the
Runtime.exec() calls. For example:

    Runtime.getRuntime().exec("/usr/sbin/adduser foobar");


Nathan


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to