LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

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

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


hi
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
jainforall
LQ Newbie
 
Registered: Oct 2007
Location: India
Distribution: Fedora
Posts: 6

Rep: Reputation: 0
Hi,
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
http://java.sun.com/developer/online.../jniexamp.html
 
Old 03-20-2008, 04:05 AM   #3
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
hi
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
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,711

Rep: Reputation: 488Reputation: 488Reputation: 488Reputation: 488Reputation: 488
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.
 
  


Reply


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


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

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