How to call system command to launch Windows Explorer

Hello,
I'd like to open the windows explorer from java.... anyone know how this is done?
thanks

thanks for ur reply.
i get the following exception when i run the code provided...
java.io.IOException: CreateProcess: iexplore.exe error=2
     at java.lang.Win32Process.create(Native Method)
     at java.lang.Win32Process.<init>(Win32Process.java:66)
     at java.lang.Runtime.execInternal(Native Method)
     at java.lang.Runtime.exec(Runtime.java:566)
     at java.lang.Runtime.exec(Runtime.java:428)
     at java.lang.Runtime.exec(Runtime.java:364)
     at java.lang.Runtime.exec(Runtime.java:326)
     at Run.main(Run.java:5)
Exception in thread "main" also, i needed a way to open exploerer to a preset directory. do i just append the directory location before the iexplore.exe ? anyone? thanks

Similar Messages

  • How to call systems commands

    Hello guys,
    I will like to know if there is a way of calling system command and shell commands in windows without making use of the Runtime Class in java.
    Also when ever i call a system command or shells commands from my java application using the runtime class, it open the a new shell(Command Prompt) before executing the command.
    I await your response. Thanks in advance.
    Joe.

    How about this? http://onesearch.sun.com/ClickThru?qt=without+command+window&url=http%3A%2F%2Fforum.java.sun.com%2Fthread.jsp%3Fforum%3D31%26thread%3D440546&pathInfo=%2Fsearch%2Fdevelopers%2Findex.jsp&hitNum=2&col=devforums

  • How to call system command in vc++?

    i wish to call the netsend command in the program but i dont know how to do it? can you please show me the actually of calling net send command in the way of mfc?

    Take a look at the Win32 CreateProcess, ShellExecute, and ShellExecuteEx functions.
    - Elton

  • How to call a servlet in new window without toolbar from OA page

    How to call a servlet in new window without toolbar from a OA page?Please provide sample code

    I have tried with the way suggested in Mukul's blog using javascript in Destination URI property.
    I tried to open a OA Page and from which forwarded it to a servlet..
    It is showing the error:
    Error Page
    Exception Details.
    oracle.apps.fnd.framework.OAException: The application id or shortname () you entered does not exist.
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1223)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1969)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at oa_html._OA._jspService(_OA.java:86)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:178)
         at oracle.jsp.JspServlet.service(JspServlet.java:148)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175)
         at oa_html._OA._jspService(_OA.java:96)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:178)
         at oracle.jsp.JspServlet.service(JspServlet.java:148)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    oracle.apps.fnd.framework.OAException: The application id or shortname () you entered does not exist.
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getAppId(OAWebBeanFactoryImpl.java:5391)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:969)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at oa_html._OA._jspService(_OA.java:86)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:178)
         at oracle.jsp.JspServlet.service(JspServlet.java:148)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175)
         at oa_html._OA._jspService(_OA.java:96)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:178)
         at oracle.jsp.JspServlet.service(JspServlet.java:148)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    oracle.apps.fnd.framework.OAException: The application id or shortname () you entered does not exist.
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getAppId(OAWebBeanFactoryImpl.java:5391)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:969)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at oa_html._OA._jspService(_OA.java:86)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:178)
         at oracle.jsp.JspServlet.service(JspServlet.java:148)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175)
         at oa_html._OA._jspService(_OA.java:96)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:178)
         at oracle.jsp.JspServlet.service(JspServlet.java:148)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)

  • How to call gnuplot command from java

    Hi there,
    In our course, we are required to develop an GUI for gnuplot. In case you don't know about gnuplot, it's a plotting program and has lots of command. We want to use java and swing, but now we don't know how to call gnuplot command from java, or how to execute a shell command(script) from java.
    By the way, since we need read in files with several columns of data and allow user to select a column, we want to use JTable. Is that reasonable?
    Thanks a lot for any suggestions!
    Jack

    Hi, there:
    Will using JTable add much overhead? I may have to use several JTables and switch among them. I can add scroll bar to or edit JTables, right?
    BTW, do you have experience about gnuplot? Can I find the command tree of gnuplot somewhere? Or do you know a better place to post question about gnuplot? unix/linux group, maybe.
    Thanks,
    Jack
    P.S. Would you guys answer my question after I use up my duke dollars? :- )

  • OfficeJet 4500 and Problem with Launching Windows Explorer (XP OS)

    I installed HP OfficeJet 4500 wireless printer with XP operating system on my desktop PC in Wireless mode.  Printing works fine from desktop and wireless laptops.  However, when I try to access Windows Explorer on my desktop PC, using the desktop shortcut or executable file name in the "Run" menu, the screen flashes, goes blank (blue screen) then refreshes the desktop but will not launch Windows Explorer.  This also occurs when I go to My Computer or Network Places and select "My Documents" or click on the root of the C: drive.  The only way I can access my files is to use the actual program they were created in (i.e., Word, Excel, Adobe, etc.)  I used System Restore and restored my computer to a date prior to installing the printer and this solved the problem.  When I reinstalled the HP OfficeJet printer, the problem recurred, so it is definitely associated with installing the printer.  Anyone have a fix for this?  Thanks for your help.

    Hi,
    I haven't seen that issue specifically.  I would download and run the HP Printer Diagnostic Utility.  There might be some file conflicts during the installation that are not resolved that this utility might fix.  I have a C309a AiO that had some other issue that the Diagnostic utility fixed.
    Print Diagnostic Utility
    Say Thanks by clicking the Kudos Star in the post that helped you. Please mark the post that solves your problem as Accepted Solution.
    I am employed by HP

  • Use the command "Properties" in Windows Explorer to unlock the file

    I'm getting this error where, when I start Photoshop, I get a popup saying "Cannot load Photoshop because the file is locked or you don't have the needed privileges.. Use the command "Properties" in Windows Explorer to unlock the file". I unlocked it's access to everyone for the 64-bit and the 32-bit version, still doesn't work. The only way to make it work is by going in Program Files>Adobe>Adobe Photoshop CS5 (64-bit) and manually starting it as an administrator.
    Everything was working just fine until today. Please help!

    If this worked before, and you have made no hardware or software changes you might want to reset the preferences.
    Start photoshop and IMMEDIATELY  hold down the Alt + Ctrl + shift keys.  It is a little tricky but keep trying until you get a reset window.

  • How to call linux command ?

    hi all,
    I wanna make java application which display the ouput of linux command (eg. ps -ax output in JTextArea).
    The problem is how to call "ps,kill,etc" ?

    JTextArea txtOutput = new JTextArea();
    String cmd = "ps -a";
    Process proc = Runtime.getRuntime().exec(cmd);
    BufferedReader buf = new BufferedReader(new InputStreamReader(proc.getInputStream()));
    String out;
    while ((out = buf.readLine()) != null){
    System.out.println("Output: "+out);
    txtOutput.append(out+"\n");
    }

  • How to run system commands from JAVA

    Hi Friends,
    How to run windows system commands from JAVA
    Runtime r=Runtime.getRuntime();
    r.exec("dir");
    Throwing following Exception
    CreateProcess :dir error=2
    Thanks in advance
    Hamsa

    Hi ,
    in Windows NT this is not possible, you can use the following :
    Runtime r=Runtime.getRuntime();
    StringBuffer sbuf = new StringBuffer();
    String dir = new String();
    java.lang.Process proc = r.exec("cmd /c dir");
    InputStream is = proc.getInputStream();
    int ch ;
    while((ch=is.read() ) != -1)
    sbuf.append((char)ch);
    is.close();
    dir = sbuf.toString();
    System.out.println(dir );

  • Please help how to run System commands and batch files thru java program

    Sir,
    I want execute OS commands like dir,cls..etc and batch files,.exe filesthru java program.
    I have tried it sofar thru Runtime.getRuntime().exec("execute.bat");
    but it is not working.anybody knows about how to run the system commands thru java please give me the code.
    thank you,
    regards,
    j.mouli

    I've seen other posts with this questions, and answers. Unfortunately I didn't pay much attention. But the basic idea is to exec command.com and pass the specifc batch or command as an argument.

  • How to call external application (transaction launcher) from event method

    Hi all
    Can somebody tell me which program lines to put into an event handler method in a view controller to get an external application called. I intend to define the link to the external application in the Transaction Launcher. But I cannot find any instructions on how to call the Transaction Launcher from my event handler method. I do not want to launch the application from the navigation bar, ONLY via a link in a list of invoices in a table view, and I want to press the invoice number to get an external application called to display the invoice. My event handler method gets called fine enough, but I have no clue which program lines to put into the method to pass on the call to the Transaction Launcher
    Best regards
    Arne Thage / MarchIT / Denmark

    hi,
    check class CL_CRM_UI_LTX_NAVBAR_PARAM.
    call method : CREATE_PARAMETER_OBJECT with parameters
    IV_LINK_ID     Importing     Type     CRMT_UI_LOGICAL_LINK_ID                                                                                Logical Link ID
    IV_PARAMETER     Importing     Type     CRMT_UI_LINK_PARAMETER                                                                                Link Parameter
    RV_RESULT     Returning     Type Ref To     IF_BOL_BO_PROPERTY_ACCESS                                                                                BO Attribute
    I think it should work but have never done myself.
    Best Regards
    Pankaj Kumar

  • How to execute System command through Applet

    Hi all,
    How can I execute a System command through Applet.
    I have written a code Runtime.exec("ls") in my applet but it gives me
    this execption even if I certify the applet ->
    java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
         at java.security.AccessController.checkPermission(AccessController.java:399)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
         at java.lang.SecurityManager.checkExec(SecurityManager.java:802)
         at java.lang.Runtime.exec(Runtime.java:548)
         at java.lang.Runtime.exec(Runtime.java:418)
         at java.lang.Runtime.exec(Runtime.java:361)
         at java.lang.Runtime.exec(Runtime.java:325)
         at Test.init(Test.java:24)
         at sun.applet.AppletPanel.run(AppletPanel.java:344)
         at sun.plugin.navig.motif.MotifAppletViewer.maf_run(MotifAppletViewer.java:123)
         at sun.plugin.navig.motif.MotifAppletViewer.run(MotifAppletViewer.java:119)
         at java.lang.Thread.run(Thread.java:484)
    Thanks,
    Manoj.

    There should be a lesson about this somewhere.
    When you visit a web page, does it ask you if you want to have an applet loaded?
    Answer: No
    So, if you visit a page, and an applet is silently loaded which can then execute commands on your computer, is this good?
    Answer: No
    So why do you want to do this?
    Is it good for anyone?
    I mean, if I want to do "ls", can't I just open a command line? Do I need an applet to do it for me?
    Either you have devious desires or your hacking together something that probably shouldn't be.
    If you want to learn start here:
    http://java.sun.com/docs/books/tutorial/security1.2/index.html
    With the article entitled:
    Quick Tour of Controlling Applets
    Ian

  • Call System Command

    I am executing the following command from a abap program to execute a Unix Script. The script executes successfully but it comes back to the program with a sy-subrc return code of -1????? Anyone have any ideas? We are on 4.6c
    Thank You
    *&      Form  EXECUTE_UNIX_COMMAND                                     *
    form execute_unix_command.
    CALL 'SYSTEM' ID 'COMMAND' FIELD app_script
                   ID 'TAB'     FIELD TABL-SYS.

    Hi Joe,
    Check the Below program, you will get this program in latest versions from 4.6c...
    RSBDCOS0---->subroutine EXEC
    look OSS Note 9391 for more info
    Regards,
    Srinivas

  • Windows 8.1 & Skype: how to call a contact from the Windows Contact List?

    Hi  I just added a contact on Win 8.1 Surface. When I try to call directly from the windows contact list I get a message that skype has been replaced by skype for desktop. When I remove the skype app (and keep skype for desktop) calling from the list is also not possible: I get a message that no app is associated (message-skype-com) Is there a way around it? Or is it currently not possible to call a skype contact from windows contacts? 

    Hi, Pancake12,
    Because I am not certain I an interpreting what you mean - although it looks quite literal - I am going to provide three separate pieces of information:
    - To remove a contact's name from your Skype sign-in window, please refer to the instruction in this FAQ article - using their account name, not yours:  https://support.skype.com/en/faq/FA11070/how-can-i​-remove-my-skype-name-from-the-sign-in-screen-in-s​...
    - In case you mean removing a contact from the Skype Home Screen when you say, "sign in window," unfortunately, we cannot do this.  Skype has some arbitrary algorithm which places recently contacted people on the Home Screen.
    - In case you mean removing a contact from your contact list, here is an FAQ with the details how to do this:  https://support.skype.com/en/faq/FA421/how-do-i-or​ganize-my-contacts   In Windows, it's as easy as highlighting by single-clicking a contact's name, right-click, and choose Remove from Contacts or Block.
    Hope this helps!
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • How to call dos commands through HTMLDB buttons

    HI,
    How do i call DOS commands through HTMLDB buttons, or on any process?
    can anyone help me on this?
    THANKS!
    BROKEN

    This article explains how to execute shell commands from whitin pl/sql using java (in the database).
    http://www.oracle-base.com/articles/8i/ShellCommandsFromPLSQL.php
    It is for Oracle8i but should still work. This still looks like a good way to go.
    ~Dietmar.

Maybe you are looking for

  • New BT Infinity order... Order tracking fails

    Hello, I ordered BT Infinity this afternoon, as my cabinet went live this Saturday. I gave my MAC code to the BT rep on the phone, and everything went smoothly. I have an engineer booked for 1st November between 8am-1pm to install Infinity and get ev

  • Authentication Error while Sending Email from SMTP server.

    Authentication Error while Sending Email from SMTP server.  Can receive emails but cannot send emails from this account. 

  • TOC - First level appearing after 1st instance of 2nd level

    Is there a known issue or paragraph style conflict that might cause the first level title to appear after the first instance (same page#) of the 2nd level in the table of contents? for example, chapter one page 1 should appear first in this list but

  • God example of DMS integration in the SD/MM/PP area??

    Hi! I wonder if anyone has a good example of how to use the DMS object connection to the SAP logistic processes? Is it possible to create a object link and then have this link copied between a material and an order? Please give me some good examples

  • IPod Nano 8GB -- No Summary Tabs, etc...

    Just bought a new 8GB iPod nano. Apart from the fact that it won't sync (the dreaded "Error -48"), I also can't access the Summary, Music, Podcasts, etc. tabs... With my previous iPod, these appeared in a pane on the right hand side of iTunes. Now al