Re: how to execute commands.
- From: "Sundar" <sundar22in@xxxxxxxxx>
- Date: 29 Dec 2006 01:57:06 -0800
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
RedGrittyBrick wrote:
Prajwal wrote:
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.String,%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."
.
- References:
- how to execute commands.
- From: Prajwal
- Re: how to execute commands.
- From: RedGrittyBrick
- how to execute commands.
- Prev by Date: Re: jsp prg
- Next by Date: Re: a way of converting a roman numeral into an integer
- Previous by thread: Re: how to execute commands.
- Next by thread: jsp prg
- Index(es):
Relevant Pages
|