LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-27-2010, 02:37 PM   #1
nakul.k1
LQ Newbie
 
Registered: Jul 2010
Posts: 25

Rep: Reputation: 0
Smile how does java interact with linux user space application.


Hello every one

As i see most of the userspace application code is in java which will call the user space C or C++ application that will interact with kernel space linux code by system call.

now my doubt is how does this java application interact with linux user space application.

for example:
On android mobile if one wants to see SIM contacts all he does is just go to phone book contacts which is a java application and needs to interact with a user-space application which will transfer the control to kernel space to reads a SIM phone book contact.

now my doubt is:
how does this java application communicate with linux user space applications.


NRK
 
Old 10-27-2010, 03:27 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Please use better thread titles if you expect to get help on a public forum. Title changed.
 
Old 10-28-2010, 02:09 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

1. The intent in Java is to insulate you in your "own little world". You're strongly discouraged from stepping outside that little world (the Java virtual environment; the Java API) unless you absolutely must.

2. One common way for Java programs to access the "outside world" is by using Runtime.exec(). For example, you can get a process listing via "Runtime.exec ("ps -ae")".

3. Another, more difficult way, is for Java to access C libraries directly. This is done using JNI.

4. All of the above applies to Windows, Linux and MacOS.

Things are a little different for Android, however.

The Linux kernel in Android is much slimmer than a Linux desktop kernel; the Dalvik JVM is much, much closer integrated to the kernel (and the underlying hardware) than a "normal" J2SE JVM running in a "normal" Linux kernel.

5. If you want to experiment with Android, you should download the Android SDK stick with the (higher-level) Java API has much as you can, for as long as you can. It's more practical, you'll be more productive - it just makes more sense.

IMHO...

Last edited by paulsm4; 10-28-2010 at 02:12 PM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I make Java interact with Shell? snowball0916 Programming 4 04-14-2011 01:32 AM
[SOLVED] user space application nakul.k1 Linux - Kernel 2 10-27-2010 02:36 PM
User space application and GPL connie84911 Linux - General 1 01-06-2010 03:31 PM
notify user space application from the kernel space lordofring Linux - Software 2 06-22-2009 12:32 PM
Kernel Module to send Message to User Space Application hnshashi Linux - Newbie 2 08-22-2008 12:48 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:37 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration