How to include a parameter executing a command line from java??

Hey
I've a problem It's very single for you: this consists in execute a command from java
in this case the command is : runas but I've tried nd is good but I can´t include the password.
This is due to the sintaxis is :
runas /user:127.0.0.1\Administrator cmd
The first command is execute but.. the problem is it show the input for the password.
And the password is not let including in the command line
How can I do that? Please help me is very urgent.
Any help will be very appreciated.
Thanks in advance.
Best Regards.

DAnt. wrote:
what is the name of the correct forum which I must visite? this is because I couln't found the correct forum.You will not find it on the Oracle website
I expect your prompt reply,help me!http://tinyurl.com/yak89nc

Similar Messages

  • How to execute unix command line from cocoa?

    how to execute unix command line from cocoa?
    for example, if I want to call "ping" from cocoa, how should I do it? and how can I obtain the return value?
    thank you.
    Power G5 Quad Mac OS X (10.4.3)

    The following article may also help:
    http://cocoadevcentral.com/articles/000025.php
    Mihalis.
    Dual G5 @ 2GHz   Mac OS X (10.4.6)  

  • How to execute Dos Command 'Pause' from Java ?

    How to execute Dos Command 'Pause' from Java ?
    I have read the article in javaworld for Runtime.exec() anomalies.
    Can someone please give an insight on this?

    Thanks Buddy!
    That was very useful. Even though its a simple
    solution, I never thought about that.Bullshit! Reread reply #7 of http://forum.java.sun.com/thread.jspa?threadID=780193

  • Execute command line from Java

    I have an easy one for you!
    I would like to know how I can execute a command line from my java code.
    The only thing I want to do is to launch a html page with the default browser in my computer when I press one button of my java application but I dont know wich class I should use to do it. My application will already know what is the file name.
    Thank for your help
    Eric

    Javaworld has some source code that does this:
    http://www.javaworld.com/javaworld/javatips/jw-javatip66.html

  • To execute command line from java programmin

    Hi,
    I need to execute a command line like ping command from java applications can any help me on this. Thanks in advance.

    Runtime.exec
    Also read: When Runtime.exec() won't: Navigate yourself around pitfalls related to the Runtime.exec() method

  • Help Please: How to invoke unix command lines from java?

    I have read past topics. Those are really helpful, but I still haven't got my job done. I tried the following:
    String command1 = "ls -la > ls1.txt";
    Runtime.getRuntime().exec(command1);
    String command2 = "tcsh -c ls -la > ls2.txt";
    Runtime.getRuntime().exec(command2);
    String command4 = "cp keywords.txt copyversion1.txt";
    Runtime.getRuntime().exec(command4);
    String command5 = "tcsh -c cp keywords.txt copyversion2.txt";
    Runtime.getRuntime().exec(command5);
    String command6 = "tcsh -c 'cp keywords.txt copyversion3.txt'";
    Runtime.getRuntime().exec(command6);
    Only "command4" works. Any input will be greatly appreciated.

    Thank you very much Gautam. Your solution certainly works. If you don't mind, I would like to ask you (or anybody who is willing to answer) something else. I am trying to run other types of unix command lines as well. I thought that the format you gave would work for everything. But it doesn't seem so:
    String command1[] = {"tcsh", "-c", "ls -la > ls1.txt "}; // this works as you suggested
    Runtime.getRuntime().exec(command1);
    String command12[] = {"tcsh", "-c", "lynx -dump http://www.yahoo.com > webpage.txt"}; //working fine.
    Runtime.getRuntime().exec(command12);
    String command10[] = {"tcsh", "-c", "ngram-count -text keywords.txt -lm LM10 &"}; //doesn't work
    Runtime.getRuntime().exec(command10);
    String command[] = {"tcsh", "-c", "/u/drspeech/sun4/bin/ngram-count -text keywords.txt -lm LM0 &"}; // doesn't work
    Runtime.getRuntime().exec(command);
    String command13[] = {"tcsh", "-c", "ngc -text keywords.txt -lm LM13"}; // doesn't work
    Runtime.getRuntime().exec(command13);
    String command8 = "ngram-count -text keywords.txt -lm LM8 &"; //doesn't work
    Runtime.getRuntime().exec(command8);
    String command9 = "/u/drspeech/sun4/bin/ngram-count -text keywords.txt -lm LM9 &"; //doesn't work
    Runtime.getRuntime().exec(command9);
    I tried "commandd1" and "command12". Those worked fine. No problemo. However, there's someting else I need to get done for my job; that is "command10". But it just didn't work. I thought maybe, it's because "ngram-count" is not part of the standard UNIX commands. So, I thought I might just add another alias for it in the ".cshrc" file and call it "ngc" instead. Then I tried to call the alias "ngc" instead. But it didn't work also. Then I thought, maybe, I should call it by referencing it from its original directory "/u/drspeech/sun4/bin/ngram-count". That didn't work either. I tried a couple of other combinations. None worked. I would really like to see how to solve this.

  • Invoke a command-line from java

    Hello!
    I wonder if there' s a way to invoke a command or running an .exe file from java code.
    10X,
    Yaron

    Sure, using the exec method in the class Runtime. You have to be careful with it though...
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Execute windows command line to a file

    Hi,
    I would like to run a windows command line from Java and output the result to a file.
    eg.
    cmd> mycommand hello > output.txt
    in windows ">" is to output the result to a file.
    I've tried
    String command  = "mycommand hello > output.txt";
    Process process = Runtime.getRuntime().exec(command);But that exec() didn't output to a file.
    Can someone give me an example on how to do this?
    Thanks

    You are falling for one of the traps described here. The redirection operator '>' has to be interpreted by a shell or command processor. On windows this would be
    String command  = "cmd.exe /C mycommand hello > output.txt";and on Linux this would beString command  = "sh -c mycommand hello > output.txt";You should read all 4 sections of the traps article and implement ALL the recommendations or you will be back here again.

  • How to make system call to execute command line in JAVA?

    Hi,
    I am new in JAVA. How to make system call to execute the following command line in JAVA in LINUX environment.
    rpm -qa jdkIn C programming, use as such:
    system ("rpm -qa jdk");
    How about JAVA?
    Thanks.

    Runtime.getRuntime().exec. But first read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Execute command lines from Xcelsius 2008

    Hello,
    Is there any possible way to execute command lines from Xcelsius 2008 swf?
    Thank you.

    Hi,
    You cannot call out to command-line from a Flash SWF, it is sandboxed so does not know how to do any of that.
    One (complicated) option would be to write your own app to embed the SWF into, a real app can then call out to do whatever you want, then you just have to get the SWF to communicate with your app using External Interface, it would be a lot of work.
    Regards
    Matt

  • How to change "open with" defaults via command line?!?

    folks,
    i know that if i get info on a file -- in this case, a filemaker 5.5 file -- i can choose the default "open with" settings and apply those settings to all files of that kind. see the attached image for what i mean.
    but how do i do that via the command line?
    thus far, here's what i've got: i know that i can open a document called "scrubbing shell.sh" on my desktop WITH either MS Word of TextEdit by calling:
    open -a textedit /Users/david/Desktop/scrubbing-shell.sh
    or
    open -a Microsoft\ Word /Users/david/Desktop/scrubbing-shell.sh
    no sweat. BUT....how do i set the defaults so that it ALWAYS opens with that app in the future when double-clicking via the GUI?
    many thanks, ya'll!
    david koff
    associate systems admin
    the j. paul getty trust
    dkoff AT getty DOT edu

    Hi David,
       OK, I investigated the new format and treatment. It appears that the first entry in the property list file that matches the file being opened wins. The Finder may still honor the new format; when I moved my old Panther file into Tiger it seemed to work. However, in other ways, the Finder doesn't recognize the old format, which is the format of the FileMaker entries you posted.
       The Finder puts all of the new format entries at the beginning of the property list file. If you change a preference that was controlled by an old format entry, the Finder won't edit that entry. What it will do is to create a new entry in the new format closer to the beginning of the file than any of the old-format entries. SInce the new entry comes first, the old one doesn't apply. If you then edit the preference and change it back to what it was before, the Finder will edit the new entry. Consider the following sequence of events and commands:
    % cp ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy.plist
    I change all GIF files to be opened by GraphicConverter instead of Preview, which is an old setting in the old format.
    % plutil -convert xml1 ~/Library/Preferences/com.apple.LaunchServices.plist
    % diff --text ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy.plist
    404,409d403
    <      <dict>
    <         <key>LSHandlerContentType</key>
    <         <string>com.compuserve.gif</string>
    <         <key>LSHandlerRoleAll</key>
    <         <string>com.lemkesoft.graphicconverter</string>
    <      </dict>
    Then I change all the GIF files to be opened by Preview again.
    % plutil -convert xml1 ~/Library/Preferences/com.apple.LaunchServices.plist
    % cp ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy2.plist
    % diff --text ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy.plist
    404,409d403
    <       <dict>
    <          <key>LSHandlerContentType</key>
    <          <string>com.compuserve.gif</string>
    <          <key>LSHandlerRoleAll</key>
    <          <string>com.apple.preview</string>
    <       </dict>
    % diff --text ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy2.plist
    408c408
    <          <string>com.apple.preview</string>
              <string>com.lemkesoft.graphicconverter</string>
       Note that I had to change the file to text after every change because the Finder converted the file to binary format every time it edited it. I didn't have to logout or reboot; the property list file change less than a second after the preference was set. I'm guessing that because you were just looking at the old-format entry, you missed the real changes to your property list file. Did it change from text to binary format? Try the command line tools that I used above.
       Note that this means that it matters where you put your entries in the property list file if you edit it.
    Gary
    ~~~~
       There are only 10 kinds of people in the world. Those
       who understand binary numbers and those who don't.

  • How to install adobe flash player through command line with some script

    Hi Guys,
    Do you know how to install adobe flash player through command line with some script?
    Thanks,
    Galina

    Windows. I tried silent install  with "install_flash_player.exe /install" but it works only with one file that I downloaded from adobe.com - "install_flashplayer10_mssd_aih.exe". But it is possible to download this last file only one time, every next time it redirects me to download install_flash_player.exe file.

  • How do I pass parameter to different portlet regions from another page?

    How do I pass parameter to different portlet regions from
    another page?
    I have a page that with two regions. Each region has a report
    that uses the same information to generate its report.
    Individually running the reports, I can use p_arg_names and
    p_arg_values to get what I want. However, when I run the page
    that has both portlets, my .show is gone and I cannot get it to
    use the p_arg_names, etc. Do you have any idea how to overcome
    this? Thanks for any help.

    How do I pass parameter to different portlet regions from
    another page?
    I have a page that with two regions. Each region has a report
    that uses the same information to generate its report.
    Individually running the reports, I can use p_arg_names and
    p_arg_values to get what I want. However, when I run the page
    that has both portlets, my .show is gone and I cannot get it to
    use the p_arg_names, etc. Do you have any idea how to overcome
    this? Thanks for any help.

  • How to call a ODI Job using Command line?

    Hello All,
    Please help me on this..
    How to call an ODI Job using Command line?
    Thanks
    Ravikiran

    Generate a scenario of your package. Then go to <ODI_HOME>/oracledi/agent/bin in command prompt and invoke startscen command .
    startcmd.sh OdiStartScen -SCEN_NAME=scn_load_data -SCEN_VERSION=001 -CONTEXT=GLOBAL -AGENT_CODE=odiSchedAgent001
    Bhabani
    http://dwteam.in

  • How to undeploy an .sda file through command line

    Hi,
    How to undeploy an .sda file through command line.send me the related command to do it.and related information and links.

    Hi
    Please find below the steps to undeploy thro command line :
    Shut down the sdm server
    1)SDM shutdown "sdmhome=D:\usr\sap\J2E\JCO1\SDM\program" "sdmguiport=50018" "sdmhostname=<hostname>" password="<password>" "shutdownmode=abort"
    2)sdm jstartup "mode=standalone" "sdmhome=c:\usr\sap\J2E\DVEBMGS00\SDM\program"
    3) sdm undeploy "sdmhome=D:\usr\sap\J2E\DVEBMGS00\SDM\program" "compname=c:\test.sda"
    4)sdm jstartup "mode=integrated" "sdmhome=c:\usr\sap\J2E\DVEBMGS00\SDM\program"
    5)start the sdm server again
    SDM server "sdmhome=D:\usr\sap\J2E\JCO1\SDM\program"
    Hope this helps. do not forget to reward points
    regards
    rajeshkr

Maybe you are looking for

  • Safari 5 slow to load pages and fails to resolve addresses - flickering men

    At first safari 5 worked great, a day after it began to take ages to resolve and address or worse to load a page. Now I stare at the loading item x of x for ages before a page will come up. Also, open a couple of tabs and all menus start to flicker w

  • REAL simple question!

    hi, i am using a BufferStrategy to double buffer my applet. Basically here is my applet: public class appletContext extends java.applet.Applet {     public void init() {         Game game = new Game(this.getSize().width, this.getSize().height);      

  • How to run Firefox OS apps without Simulator

    Sorry, just making sure, but is there a way to run Firefox OS apps in Firefox WITHOUT the Firefox OS Simulator? I have the Simulator (I actually have mutliple versions), but I would like to see if there is some way to "trick" Firefox into to thinking

  • IE Flex bug?

    I'm new to Flex and still learning (SORRY FOR THE LONG POST but its a strange scenario). I have a very strange issue happening thats really been bothering me. I've setup Flex to correctly map to my ColdFusion RDS development server. I followed the in

  • Problem in CIF Inbound Queue

    Hello Every1,      When I try to process the CIF inbound queue (APO system) it says the logical system is not  found. But when I check in the table TRFCQIN and TRFCQSTATE the logical system has assigned properly. So please let me know how to rectify