Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Executing unix command �echo $0� using Runtime.exec()

843798Jan 12 2006 — edited Jan 13 2006
I use jdk1.5 and SunOS.
When I tried executing the command �echo $0� using Runtime.exec() in my java program, I got the out put as $0.
But when you execute the command �echo $0� on the SunOS shell, it prints the current running shell name. ex. bash.
Please let me know the solution for the above problem.

Thank you.
Vinod H.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 10 2006
Added on Jan 12 2006
7 comments
463 views