Re: how to execute commands.



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."

.



Relevant Pages

  • Re: how to execute commands.
    ... Am new to java. ... Google will often provide an answer quicker than newsgroups can. ... I assume you are referring to Runtime.getRuntime.exec(Stringcommand), and that you are passing relative filenames as parameters to a command. ... 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." ...
    (comp.lang.java.help)
  • Supershell (Windows XP, VB)
    ... ctrl+windows and type the command. ... :> google pda technology (Will do the obvious, ... :> /database/library (opens the specified folder underneath the ...
    (comp.programming)
  • Supershell (Windows XP, VB)
    ... ctrl+windows and type the command. ... :> google pda technology (Will do the obvious, ... :> /database/library (opens the specified folder underneath the ...
    (microsoft.public.vb.general.discussion)
  • Re: Open Office Cocoa
    ... noi attualmente usiamo Flash per il playback dei Google Video ... lato client di Internet" usiamo piu` che altro ... AJAX e mi sembra che ci abbiamo fatto delle belle cosine, ... Quanto a Java client-side, non credo che Google al momento ne abbia ...
    (it.comp.macintosh)
  • Re: 7.0 wishlist?
    ... Publicly accusing a specific person of stupidity, on the other hand, is an insult. ... This is a forum for discussing Java programming, not for assigning blame and arguing over who is at fault. ... domain-specific libraries, and ImageIO plugins and the like. ... I've had to filter JSTOR because that site produced so many Google hits I couldn't use on so many diverse topics, and there's a ton of other candidates for the same treatment, mostly scientific journal sites. ...
    (comp.lang.java.programmer)