Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 08-04-2004, 08:13 PM   #1
Registered: Jul 2004
Posts: 35

Rep: Reputation: 15
Question how to call a system command with java applet?

I want to call a system command "df" to show information of the system with java applet,
is there any function to implement ?

Last edited by nickhx; 08-05-2004 at 07:41 PM.
Old 08-05-2004, 01:38 AM   #2
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
For security reasons, a java applet is by default running in a "sand box", preventing it to access the underlying operation system.
Breaking it is only possible if you manage to sign your applet with a certificate accepted by the browser, and if the user authorize the applet to do the things it want.

Old 08-05-2004, 07:02 AM   #3
Registered: Jul 2004
Location: Pakistan
Distribution: Ubuntu
Posts: 185

Rep: Reputation: 30
I remember a little there was something like getRuntime(), i don't exactly remember how to do it but search for it hope you will find your answer.
Old 08-05-2004, 07:20 AM   #4
LQ Guru
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 47
You will have to take care of the standard io streams for the command to work properly, and for you to get the output.
Applets are usually not allowed to use this.
Old 08-11-2004, 12:46 AM   #5
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Debian etch, Gentoo
Posts: 312

Rep: Reputation: 30
you will have to sign your applet to allow it fewer restrictions on the remote box it's running... which means any user that sees the page will have a dialog pop up verifying they want to allow it said permission... similar to SSL certificates... like when you go to a site with a self-generated certificate and the browser asks you if you want to accept it now, forever, or not at all...


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
Java plugin installed correctly for Firefox but not able to view any java applet tvn Linux - Software 10 04-15-2010 02:13 AM
Is Mount a system call or shell command? comeon Linux - Software 8 02-20-2005 11:55 PM
system call in java alaios Programming 1 01-18-2005 09:54 AM
where is command "cd" located? or is it a command/ system call? feetyouwell Linux - Software 5 10-01-2004 08:01 PM
Looking for app/applet don't know what to call it? Palin Linux - Newbie 3 02-15-2003 01:33 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:13 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
Open Source Consulting | Domain Registration