Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

running unix 'su 'cmd from java

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi all,
i want to run various unix cmds like su, cd ,and also shell scripts thru java prg..
but using Runtime.getRuntime().exec("su - imail") , i am not able to attain control over the imail user id over the session. is it that the process runs and terminates? i want to actually switch to user imail thru java code.
any help ? also when i do
Runtime.getRuntime().exec("cd bin") , i want to be physically located at that position.

any alternative ?


Regards
SONAL
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
This is essentially a repost of this. I'm going to close this thread, and then go over and reply in the other one, where a discussion is already in progress.
    Bookmark Topic Watch Topic
  • New Topic