Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-18-2008, 12:55 AM   #1
Registered: Oct 2007
Posts: 160

Rep: Reputation: 30
how does java calls the system calls which are written in c

how does the java calls the system calls which are written in c.
in general how does a program written in one language can be combined with the other.
Old 03-18-2008, 01:30 AM   #2
LQ Newbie
Registered: Oct 2007
Location: India
Distribution: Fedora
Posts: 6

Rep: Reputation: 0
I don't thinks so that you can call system call directly from java.
But you can use Java Native Interface (JNI).
To call a system call you'll have to write a small C/C++ program, that
will invoke the system call. This program you will use in Java.
For more information goto
Old 03-20-2008, 04:05 AM   #3
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
i am really intrested in knowing how two different languages interact.i have seen the link it has api's for calling sys calls. but how does they have made the api's.
Old 12-05-2011, 03:40 AM   #4
Senior Member
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,240

Rep: Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981
It really doesn't matter what language is the kernel written in -- you can use system-calls from any language, provided you fill the registers properly.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
printing system calls barunparichha Linux - Kernel 2 07-02-2006 01:44 AM
how do you use system calls? slinky2004 General 1 12-22-2005 09:39 PM
Some system calls Spooky Programming 1 11-24-2004 10:17 AM
system calls in Java AMMullan Programming 2 04-14-2004 01:48 AM
java and system calls aizkorri Programming 6 06-20-2003 01:54 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration