Make system call to unix api

I know java has a lot of things built in, but not everything is...
Is it possible to call a unix function using a simple example of (this functionality is availbe in java not my point):
#include <unistd.h>
access(const char *path, int amode);
How would one go about using this in a java application? Talking to the underlaying os?

I've used Jtux when I needed access to other Unix API's. It has a very poor installation system but otherwise works pretty well.

Similar Messages

  • How to make system call to execute command line in JAVA?

    Hi,
    I am new in JAVA. How to make system call to execute the following command line in JAVA in LINUX environment.
    rpm -qa jdkIn C programming, use as such:
    system ("rpm -qa jdk");
    How about JAVA?
    Thanks.

    Runtime.getRuntime().exec. But first read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • System Call in Unix?

    Hi,
    Is there a way to send a system call from LabView 6.1 to UNIX similar to
    the Windows environment?
    Thanks,
    Roger

    I found it. Please ignore my last post. Thanks.
    Regards,
    Roger
    "Roger C." wrote in message
    news:ak699o$4en$[email protected]..
    > Hi,
    >
    > Is there a way to send a system call from LabView 6.1 to UNIX similar
    to
    > the Windows environment?
    >
    > Thanks,
    > Roger
    >
    >

  • How to make system call remotely?

    i am working on client- server application i want to execute a system call on cllient machine from server how should i do it?

    If by "system call" you mean Runtime.exec(), then
    Runtime.getRuntime().exec(theCommand)The command needs to be sent from the client. And read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Unix system() system call in Java

    Hi,
    system() call in Unix is very helpfull when you need to implement a piece of code that is already implemented in an exsiting utility.
    Is there a way to achive a similar functionality?
    To put it in simpler words - is there a way, in Java, to call some method that will invoke a Unix shell and will execute the command specified in the string that is past in?
    Could you please CC the reply to [email protected]
    Thanks,
    -Michael

    Runtime.exec()
    > Could you please CC the reply to [email protected]
    Certainly not.

  • Making Palm System calls using J2ME

    Hi is there anyway where I can use the old KJava API or even the J2ME to make system calls such as
    DmFindDatabase(0,"Something")
    SysAppLaunch(0,dbID,0,cmdPrintChars,theChars,&result);
    axlrose82

    [axlrose82],
    At the moment, we are quite certain that the kVM for the PalmOS do not contain any API that allows a developer to make system calls to the PalmOS itself. The CLDC/MIDP specification does not specify any native system calls access any of the native apps. I can see from your code that you are trying to access the Palm database but I'm afraid you are out of luck with the current specs.
    HTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Making system calls in Flex

    - Can I make system calls to access the local file system? If
    so, is there a sample?
    - Can I make system calls to run local console
    scripts/binaries and get the output back? If so, is there a sample?
    Thanks,

    "Greg Lafrance" <[email protected]> wrote in
    message
    news:gd8flp$sul$[email protected]..
    > To be fair, Adobe's initial vision for AIR is not as a
    technology that
    > would
    > permit you to create desktop apps that do all that
    "regular" desktop apps
    > do.
    >
    > Part of the reason is because they wanted to have a
    solution that "starts"
    > to
    > blur the lines between online and desktop, but I suspect
    another reason is
    > because they wanted to get it out the door, and dealing
    with the
    > additional
    > security considerations might delay that.
    >
    > That said, I'm right there with you, I am looking
    forward to when AIR apps
    > can
    > execute native apps.
    >
    > One of the problems is that Adobe has "grown up" and now
    is getting a
    > touch
    > stiff, though I still believe they will continue to be
    one of the greatest
    > software firms out there for the next 5 - 10 - 15+
    years.
    >
    > Of course I work there, so I'm at least a bit biased.
    But then again, I am
    > a
    > bit of a rebel against some aspects of Adobe (and
    definitely against some
    > aspects of the former Macromedia) culture.
    Heh. Been there, done that. They stopped giving me t-shirts

  • System Call by Java Application - [change path and run of the other progra]

    public class  A {
         public static void main (String[] args)
              System.out.println("Hi");
    }I do have above A.java.
    I am generating A.class from it.
    A.class is in the following directory :
    /home/sachin/work/Sample_Directory/bin/hello_filetest/
    I have another program which makes System call.
    But the problem is B.java is in the different directory :
    /home/sachin/work/Sample_Directory/src/hello_filetest/
    public class  B {
         public static void main (String[] args) {
    Process p1 = Runtime.getRuntime().exec("java A);
                BufferedReader stdInput = new BufferedReader(new
                     InputStreamReader(p1.getInputStream()));
    while ((s = stdInput.readLine()) != null) {
                    System.out.println(s);
    {code}
            So, my question is how to change directory by system calls and execute the program
    which is lying in other directory ????
    Thank you.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    The following code will call javac on a .java file, which will compile it into a .class file
         public static void javacTest() {
              JFileChooser jf = new JFileChooser();
              if (jf.showOpenDialog(null) != jf.APPROVE_OPTION) return;
              File file = jf.getSelectedFile();
              File dir = file.getParentFile();
              try {
                   Process p = Runtime.getRuntime().exec("javac " + file.getName(), null, dir);
                   IOUtils.pipe(p.getInputStream(), System.out);
                   IOUtils.pipe(p.getErrorStream(), System.out);
              catch (IOException iox) {
                   iox.printStackTrace();
         }Is that what you're trying to do, or are you trying to run the compiled (.class) file? Running your .class file should be basically the same as the above, assuming that you are not using any non j2se libraries, except that you need to take into account the package (if package is x.y, you must have file in ...src\x\y\foo.class - call "java x.y.foo" from src)

  • How to make a call in Javascript to export a Report Element - The content of a cell

        Hi everyone,
    I  have a very simple question :
    How can I make a call to the API in order to export a single cell in the WEBI report in .CSV using httpRequest ?
    Thanks in advance,
    Rogerio

    hello,
    You can try the URL:
    [GET] <url>/documents/{documentId}/reports/{reportId}/elements/{elementId}
    ... with text/csv as Accept-Type and a trailing reference or datapath.
    Examples
    <url>/documents/7610/reports/1/elements/13?datapath=DP1.DObc:"2004",DP1.DOa6:"Austin"
    <url>/documents/7610/reports/1/elements/13?reference=1.D.7
    Regards,
    eric festinger

  • How do i make UNIX system calls in Java app?

    Is it possible to make UNIX system calls in a java app? I.E. perform a file copy/move to another machine within a program.
    Thanks,
    Erik

    If there is a command line tool then you use Runtime.exec() otherwise you have to use JNI.
    If you want to access shared libraries you might want to look at www.swig.org

  • Unix System Calls using Java

    Hi!
    Can anyone tell me how to do Unix System Calls in my Java program?
    If possible please give me the java code for it taking one unix system call as an example.
    Thanks in advance
    Raj

    do you mean firing off a shell command, or making actual kernel API calls or C library calls?
    for shell commands, have a look at Runtime.exec(). for kernel calls, use JNI. the JNI FAQ mentions something called "shared stubs" that may be of use:
    http://java.sun.com/products/jdk/faq/jnifaq.html
    cheers,
    p

  • I just downloaded the newest IOS software and now my iPhone5 won't pair with the Bluetooth in my car (the car system says it's paired when I try to re-pair it but then when n try to make a call it tells me it doesn't recognize the phone.

    I just downloaded the IOS upgrade, 7.0.2, and now my iPhone 5 won't pair with my Bluetooth in my car, despite repeated attempts to re-pair the two and despite the fact it's been paired fine previously.  The car system tells me it's paired but then when I try to make a call I get another message that says there is no paired phone.

    You can't override it no matter what you do. The device has to connect to the server to complete the iOS update. You could try rebooting the iPad and see if that lets you connect to the server after it starts up.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.
    If that will not work, you can try connecting to iTunes on your computer and see if the activation will complete. Sometimes when thes activation issues arise, you end up having to restore the device again, but first things first. Reboot and see what happens.

  • Call a Java API using Unix Script

    Hi SDNers,
    I want to call a Java API using Unix Script. Please suggest what will be the commands in Unix.
    Please help!!
    Thanks,
    Priti
    Edited by: Priti Rani Patnaik on Jul 7, 2010 4:17 PM

    Hi
    Try this
    String[] cmd = {"/bin/sh", "-c", "ls > hello"};
      Runtime.getRuntime().exec(cmd);
    [Other Help|/thread/5425832 [original link is broken];
    BR
    Satish Kumar

  • Good day, I can not make video calling with my MAC PRO 15 with FB Mountan Lion operating system   how can I do?    you can you help me? thank you very much

    good day,
    I can not make
    video calling
    with my MAC PRO 15
    with FB
    Mountan Lion operating system
      how can I do?
       you can you help me? thank you very much

    francesco marraffa wrote:
    good day,
    I can not make
    video calling
    with my MAC PRO 15
    with FB
    Mountan Lion operating system
      how can I do?
       you can you help me? thank you very much
    Are you running your MacBook Pro off WiFi or Ethernet?
    Pete

  • How to set "Dirty" view flag to make a system call WDDOMODIFYVIEW again

    Hi!
    When a button is hit I want to mark my view "Dirty" so that system call WDDOMODIFYVIEW again. I need this to refresh/rebuild the view after user action.

    Anurag, you right. I've created simple WD application and WDDOMODIFYVIEW is called after every button hit.
    But it my case I've added button to a standard component (FPM_OIF_COMPONENT) by means of Enhancement Points. And hitting this button does not lead to call of WDDOMODIFYVIEW method. Though all standard buttons in the componend do lead to call of this method.
    Strange behavior.
    I thought, may be there is a way to "force" system to invoke this method. Like set view to some status "Needs to be redrawn", "Dirty", "Invalid", etc.

Maybe you are looking for

  • Tool or  idea wanted...how to remove an object in a frame

    After Effects. CC2014.xxx Yesterday I effectively removed a small skin mole on a close up of a hand ( in movement) by using Simple wireframe Tool. ( and key frames) EAsy as it was at the time... I wondered if there was a better tool or technique to d

  • Reply-to in Yahoo mail is wrong

    This recently started happening and is isolated to Firefox. When I compose an email in Yahoo Mail, the return-to used is supposed to go to "[email protected]". Instead, it goes to my login Yahoo account "[email protected]". This does NOT happen on IE

  • Tecra 520 cdt - need user manual

    I have just been given a tecra 520 cdt laptop. I was wondering if anyone has a instruction manual or any info about this laptop - this is my 1st laptop i have ever owned. Thanks very much

  • What is taking up so much space? Over 90 GB is untraceable

    Today I cleaned up my MacBook Pro 13" (Mid 2010), but something invisible (to me atleast) still seems to be taking up space. Not just a little, I'm talking about over 90 GB! I included a screenshot of the problem below. The main folder is 97,78 GB, w

  • Messages Beta, Lion 10.7.3 Firewall issue.

    Everytime I reboot or I log in I see a dialog prompt : "Do you want the application "imagent.app" to accept incoming network connections?" I believe it's related to the new Messages beta and it is the firewall asking to allow incoming Facetime functi