Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Jaxson Brown   on Jul 01 In Java Category.

  
Question Answered By: Bernard Gutierrez   on Jul 01

Your method will not work.

What you do in exeCD is to create a new process  to do
CD command. This CD command  will only affect the new
process and will not affect the process you program
runs.

You can solve this problem  through a easy way. When
user type cd XXX, store the new directory  in your
object. When user type ls, then list all the files in
that directory. you need not to change  your program's
running directory physically.

Share: 

 
 
Didn't find what you were looking for? Find more on change directory - chdir Or get search suggestion and latest updates.


Tagged: