> Hello ,
> Am new to java.
I recommend you try Google before posting here. Google will often
provide an answer quicker than newsgroups can.
> i want to go inside some drive
Translation: I want to use something equivalent to a 'cd' or 'chdir'
command to change the current directory in a Java application.
There is some interesting background on this notion. Google for "Java
chdir" - see the Sun bug report for a discussion of the issues for the JVM.
> and execute some commands ther.is ther
s/ther.is ther/there. Is there/
> any option of doing the same using java RUNTIME class.
Translation: Is there any way to do this using Java's Runtime class?
I assume you are referring to Runtime.getRuntime.exec(String[] command),
and that you are passing relative filenames as parameters to a command.
I occasionally find it useful to read the documentation for the methods
I want to use, you might like to try doing this as well ...
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#exec(java.lang.St
ring,%20java.lang.String[],%20java.io.File)>
Note the part where it says "dir - the working directory of the
subprocess, or null if the subprocess should inherit the working
directory of the current process."
Sundar - 29 Dec 2006 09:57 GMT
Hi Prajwal,
I could not understand your problem. I think you need to give more
details to understand the problem.
What do you ant to do inside the directory??
- Get a list of files in the directory?
- Delete/Create files inside the directory??
You might give more details about your problem to help you.
-Sundar
> > Hello ,
> > Am new to java.
[quoted text clipped - 28 lines]
> subprocess, or null if the subprocess should inherit the working
> directory of the current process."