'Runtime' help under XP

All I want to be able to do is open up explorer to a specific directory and I can't work out the command.
I can use;
Runtime.getRuntime().exec("calc.exe");successfully for example or any other windows exe in any directory in the windows environment
however;
Runtime.getRuntime().exec("DivFix.exe", null, new File("D:\\Backup\\Utils\\DivFix")); doesn't work (throws IOException) and I can't see what im doing wrong! And yes, I've checked and double checked the path.
stacktrace =
java.io.IOException: CreateProcess: DivFix.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)
......rest is just GUI event handling stuff......
I doubt I'd have to specify a working directory in order to open up an explorer window for example, so the 2nd example code maybe irrelevant regarding the original question but it'd be useful to know for future reference. So I guess im asking two different questions here :/
tia

That's most odd, if I use the 'listFiles()' method and loop thru the array it clearly shows it I can see the 2 files in there .exe and .ini - I've tried with a few more different files (checked the same way) and im always better an error 2 in the stack trace....any ideas?

Similar Messages

  • Where is the ARH (AIR Runtime Helper) utility?

    Hello,
    AIR Runtime redistributable documentation mentions the ARH (AIR Runtime Helper) which is a tool that can detect which version of the AIR runtime and which version of my app is installed on the user's machine. However I cannot find this utility anywhere - it's not avaiable on the Run-time redistribution page or AIR SDK page.
    Where this utility is supposed to be?
    Thank you,
    Anatoly

    Hi Anatoly,
    I could not find the download link for ARH either, so I used the email address in the Adobe Software Distribution Request approval email, which is: [email protected]
    I got a response from Rob Christensen that they can be found here:
    Mac: http://airdownload.adobe.com/air/distribution/latest/mac/arh
    Win: http://airdownload.adobe.com/air/distribution/latest/win/arh.exe
    Linux: http://airdownload.adobe.com/air/distribution/latest/lin/arh
    Cheers,
    -Julie

  • I ask to help under repair MS-6398.

    I ask to help under repair MS-6398. Mosfet marked as "С5001" has burned down. Probably MSI
    has destroyed the present (true) marks of a microcircuit. I ask to help to pick up analogue.
    MS-6398 the worthy motherboard, but does not work from such trifle.

    If the board is still under warrenty MSI will take care of it.

  • Catch Runtime Exceptions under 46C

    Hello experts,
    My programme executes a dynamic open sql and the requirement is, my programme should never result in an ABAP short dump.
    With ABAP release 610, I can catch class based exceptions like cx_sy_dynamic_osql_error, but under 46C, I can only use CATCH SYSTEM-EXCEPTIONS, but no sql exceptions can be found in the runtime error list, that means no sql exceptions are perceived as catchable runtime errors.
    Therefore, could you advise how I should handle the runtime exceptions and not cause the ABAP short dump, please?
    Thanks and best regards,
    James

    http://help.sap.com/saphelp_nw04/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/content.htm
    will TRY and the CATCH statement be of any use ?

  • Runtime.exec() under a specific user account ???

    Hi there,
    I cann't figure out how to run a script on Unix under a specific user account using the Runtime.exec(). Currently whoever run the java program, the script is ran under that user account.
    The code is like:
    public class javarun {
    public static void main(String[] arg) {
    String str = "myunixscript";
    // check the arg[1] to decide the appropriate environment.
    Runtime r = Runtime.getRuntime();
    try {
    Process pr = r.exec(str);
    pr.waitFor();
    int exitstatus = pr.exitValue();
    } catch (...) {...}
    We have two user accounts: unixusr1 and unixusr2. Now I need to have unixusr1 run the java program ( ie. unixusr1$ java javarun), while the "myunixscript" be executed under unixusr2. One further step is to the unix account name as a parameter so the unixscript could be run under different account.
    Any help will be highly appreciated. Thanks.
    Edward.

    I'm not sure if I have a solution, but here are some questions:
    a) have you tried writing additional input to the OutputStream of the process? Although I have not tried it, I would imagine that Process.getOutputStream() exists for commands that require the invoking resource to send additional input to the process- like an su command that requires a password check.
    b) can you just write a shell script that takes the needed information as an argument. That is, write a shell script that takes the username and password as an argument and then you can use Runtime like,
    Runtime.exec("myScript", new String[] { "hisId", "hisPasswd" });Obviously, you would need to think through the security concerns of such a script, but, if it complies with the security structure of your environment, it might allow you to avoid the problem by using the shell script to invoke the destination command with the proper UID and password, rather then using the JVM to invoke it. Basically, the script becomes a proxy for the JVM to invoke that command.

  • Runtime Help

    Hi friends,
    Am developing an application that users send an SMS text message to a number and
    a Java program sequentially queris the phone for new messages ang processes them
    , sending a reply to the requester.
    Here is s snippet of the 'kernel' of the SMS detector
    // ---snip
    public void saveAllSMS()
            try
                // Get the SMS'es one by one (Nokia 3310)
            for (int i = 1; i < 21; i++)
                 Runtime rt = Runtime.getRuntime();
              // Get the SMS through GAMMU
              Process proc = rt.exec("gammu --getsms SM " + String.valueOf(i));
              InputStream stdin = proc.getInputStream();
              InputStreamReader isr = new InputStreamReader(stdin);
              BufferedReader br = new BufferedReader(isr);
              while ((line = br.readLine()) != null)
                        content += line + "\n";
                    // Parse the content of the SMS'es to the databases
                    //String query = "INSERT INTO smsRequests VALUES... //--SNIP
            catch (Exception e)
                System.err.println(e);
                System.exit(0);
    // ---snipNow, I would like to execute
    Runtime.getRuntime().exec("gammu --getsms SM " + String.valueOf(i));right after the SMS has been sent into the database, but the process of deleting
    fails coz the ports for connecting to the phone is still under lock from the
    running process. If I try to delete all SMS'es at once it poses a risk as some
    unprocessed SMS'es get deleted in the process. How can I run this deleting task
    of that particular SMS just after sending its content to the database?

    first off, your for loop is capped at 21 runs, why is
    that?
    secondly, why not just make all your database updates
    (1 for each message) and then, at the end once all
    values have been inserted, delete all the messages at
    once.OK, that loop executes 20 times(basic loops in Java, remember?) Then this is why I dont delete all at once:
    Suppose that there are three SMS'es in the phone.
    rt.exec("gammu --getsms SM " + String.valueOf(i)); will get the SMS'es one by
    one and into the database they go. Now suppose that GAMMU is reading the 16th
    SMS and at that time a new text message arrives and it goes into position 4 of
    the sim card. This SMS has not been sent into the database and at the end of the
    cycle if I do "gammu --deleteallsms SM 1 20" all the SMS'es are deleted (including the new,
    unprocessed one!) This is the bug am trying to work around

  • Portal runtime error under travel/ESS/MSS

    Dear all,
    When we see privew under Employee self service --> ERP 2005 EhP2 --> iviews -->travel and expenses --> create travel request
    Here I'm getting
    Portal runtime error.
    An exception occurred while processing your request. Send the exception ID to your portal administrator.
    Exception ID: 02:19_26/02/11_0006_39627050
    Refer to the log file for details about this exception.
    But it is working fine under Employee self service --> iviews -->travel and expenses --> create travel request.
    What could be reason, any body reply me.
    I appreciate if any one can share the resolution
    Regards,
    Mahee.

    Hi,
    I have checked the following thread,
    Travel Management--Webdynpro ABAP Services
    I Have added system alias. now I'm getting different error,
    Internet Explorer cannot display the webpage
    What you can try:
        Diagnose Connection Problems 
         More information
    This problem can be caused by a variety of issues, including:
    Internet connectivity has been lost.
    The website is temporarily unavailable.
    The Domain Name Server (DNS) is not reachable.
    The Domain Name Server (DNS) does not have a listing for the website's domain.
    There might be a typing error in the address.
    If this is an HTTPS (secure) address, click Tools, click Internet Options, click Advanced, and check to be sure the SSL and TLS protocols are enabled under the security section.
    For offline users
    You can still view subscribed feeds and some recently viewed webpages.
    To view subscribed feeds
    Click the Favorites Center button , click Feeds, and then click the feed you want to view.
    To view recently visited webpages (might not work on all pages)
    Click Tools , and then click Work Offline.
    Click the Favorites Center button , click History, and then click the page you want to view.
    Awaiting for your valuable response.
    thanks in advance.
    Regards,
    Mahee.

  • Help under Help

    Could someone tell me why my Help On Premier Elements 7 under HELP or F1 does not bring up help? I can get to online help but prefer first to try my programs knowledge base. Thank you   Karl

    See this FAQ:
    http://www.johnrellis.com/psedbtool/photoshop-elements-faq.htm#_The_Help_command

  • Runtime help please

    Greetings,
    First off I will admit that this a part of a project for school. I am not asking for anyone to "give me code" or to "do it for me". I am having a problem tracing a runtime error with the below code. The error only occurs when you choose a selection from the jmenu (null pointer execption on line xyz). the jmenu is supposed to update the display in the JComboBox via the setSelectedItem() and the null pointer points towards the line for the setSelectedItem(). Any assistance in pointing me towards the source of the error is appreciated.
    source code follows:
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    class Polygon extends JFrame implements ActionListener
    {   // start Polygon Class
         /* Variable Declarations */
         Color color = Color.red;
         JComboBox comboBox;
         boolean moving;
         boolean overload;
         /* End Variable Declarations */
         Polygon()
         { //start Polygon contructor
              addWindowListener(new WindowAdapter()
                        public void windowClosing(WindowEvent e)
                                  System.exit(0);
                   }); // ends anon class for window closing (ends program)
         /* Creation of the MenuBar */
         JMenuBar menu = new JMenuBar();
         JMenu menuColor = new JMenu("Color");
         JMenuItem makeRed = new JMenuItem("Red");
              menuColor.add(makeRed);
              makeRed.addActionListener(this);
         JMenuItem makeBlue = new JMenuItem("Blue");
              menuColor.add(makeBlue);
              makeBlue.addActionListener(this);
         JMenuItem makeGreen = new JMenuItem("Green");
              menuColor.add(makeGreen);
              makeGreen.addActionListener(this);
         JMenuItem makeYellow = new JMenuItem("Yellow");
              menuColor.add(makeYellow);
              makeYellow.addActionListener(this);
         menu.add(menuColor);
         setJMenuBar(menu);
         /* End Creation of the MenuBar */
         /* Creation of the Combo box*/
         Object [] items = {"Red", "Blue", "Green", "Yellow"};
         JComboBox comboBox = new JComboBox(items);
         getContentPane().add(comboBox, BorderLayout.SOUTH);
         comboBox.addActionListener(new ActionListener()
                   { //start anon class
                        public void actionPerformed(ActionEvent e)
                             { //start action Performed
                                  JComboBox comboBox = (JComboBox)e.getSource();
                                  String comboString = (String)comboBox.getSelectedItem();
                                       if(comboString.equals("Red"))
                                  color = Color.red;
                                       else if(comboString.equals("Green"))
                                            color = Color.green;
                                       else if(comboString.equals("Blue"))
                                            color = Color.blue;
                                       else if(comboString.equals("Yellow"))
                                            color = Color.yellow;
                             } //end actionPerformed
                        } //end anon class
                   ); //end function call for anon class
         /* End Creation of the Combobox */
         }// end Polygon contructor
         public void actionPerformed(ActionEvent e)
         {  // begins Actions
              JMenuItem menu = (JMenuItem)e.getSource();
              String menuString = menu.getText();
         if(menuString.equals("Yellow"))
         color = Color.yellow;
         comboBox.setSelectedItem("Yellow");
         else if(menuString.equals("Red"))
         color = Color.red;
         comboBox.setSelectedItem("Red");
         else if(menuString.equals("Blue"))
         color = Color.blue;
         comboBox.setSelectedItem("Blue");
         else if(menuString.equals("Green"))
         color = Color.green;
         comboBox.setSelectedItem("Green");
         } //ends Actions
    public static void main (String []args)
         JFrame frame = new Polygon();
         frame.setTitle("Project 3");
         frame.setSize(300, 300);
         frame.setVisible(true);
    } //end main
    }//end Ploygon Class

    hi
    I checked ur code.
    the problem is that u have initialized objects more than one time un necesssarly.
    my friend for selecting an item from a combo box there are some methods iside java plz refer to them.
    do not use String .equal() ...
    i am sue that u will get ue souirce code copiled if u remove those problem,s.

  • Unsecure socket to secure socket at runtime /help required

    I have an IMAP4 server in Java. I want to implement RFC2595 (TLS support) for it.
    Now I can listen on a separate secure socket, and use the various examples provided by JSSE to do this.
    However, this is discouraged in the RFC. It recommends using the unsecure port 143 and negotiating a secure connection via the STARTTLS command.
    The STARTTLS is sent unencrypted. Once the server accepts the STARTTLS and returns an OK response to the client an SSL negotiation is supposed to take place.
    My question is how do I achieve this with JSSE.
    Any help will be appreciated.
    Regards
    Vikash

    Does SSLSocketFactory.createSocket(Socket,...) work for you? Haven't used it myself, but it's supposed to be for exactly this case.
    Good luck!
    Grant

  • CR 2008 SP2 x64 Runtime - HELP!

    Okay - so MSFT with Server 2008R2 no longer 32bit(x86) support...
    So where is the CR 2008 SP2 Runtime for x64 !!
    Is SAP a MSFT Partner? - how do they get product certification?  Guess they don't get CR tested do they!
    Gary

    The Next version of CR will be 64 bit, not sure of all of the details yet though.
    You can always stay on supported platforms, and yes CR 2008 is Certifiable on platforms we do support.
    Windows 2008 64 bit will still run 32 bit applications, you can use it as an APP server and use a 32bit WEB server OS.
    SP2 [Platforms|http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/00225757-ab5c-2c10-c1a8-fb9f9f0f4ac2] link:
    [Updated line below]
    Windows 2008 Release 2 ( which is 64 bit only ) has not been added to the supported platforms for this reason.
    Thank you
    Don
    Edited by: Don Williams on Mar 27, 2010 10:14 PM

  • Launch Acrobat Reader with Runtime.exec() under WINNT4, without absolut pat

    Hi,
    I would like to launch Acrobat Reader from a Swing application. This works fine with Runtime.exec() as long as I provide the full path to the AcroRd32.exe. The problem is that I cannot predict the location of this exe on the systems of the users. Athough is in the Windows PATH, since I can launch from the windows execute-dialog, the Runtime.exec() is not able to locate the file.
    How can I solve this problem?
    Thanks a lot!
    Horst

    hey BIJ, thank you so much man. start really does wonders!! i was stuck with invoking a fortran program for last couple of days and now i went through your postings and tried with start. it did work!!
    thanks again,
    bhairampally

  • Help under JEditorPane

    Hi All,
    I am having a small class file in which i am using JEditorPane for opening an URL.So when i make a pane.setPage(url)..it is going into the catch block and hitting me an error instead of executing try block.Any idea why this is happening..???
    I am even attaching my piece of code.
    public class EditorPaneExample1 extends JFrame {
         String url;
         private JEditorPane pane;
    private JTextField textField;
    private JButton go;
    public EditorPaneExample1() {
    super("URL Opening Window");
    pane = new JEditorPane();
    pane.setEditable(false);
    getContentPane().add(new JScrollPane(pane), "Center");
    go=new JButton("GO");
    JPanel panel = new JPanel();
    panel.setLayout(new BorderLayout(4, 4));
    JLabel urlLabel = new JLabel("URL: ", JLabel.RIGHT);
    panel.add(urlLabel, "West");
    textField = new JTextField(32);
    panel.add(textField, "Center");
    panel.add(go,"East");
    getContentPane().add(panel, "South");
         tst_Load();
    private void tst_Load(){
    // Change page based on text field
    textField.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    if(evt.getSource()==textField){
    go.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent ae){
    if(ae.getSource()==go){
                                  url = textField.getText();
    Go(url);
    private void Go(String newURL){
         System.out.println("URL Coming is:"+newURL);
    try {
    // Try to display the page
    pane.setPage(url);
    } catch (IOException e) {
    JOptionPane.showMessageDialog(pane, new String[] {
    "Unable to open the file", url },
                        "File Open Error",
    JOptionPane.ERROR_MESSAGE);
    public static void main(String[] args) {
    try {
    } catch (Exception evt) {}
    JFrame f = new EditorPaneExample1();
    f.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent evt) {
    System.exit(0);
    f.setSize(500, 400);
    f.setVisible(true);
    Help me out.
    Thanks in advance.

    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.
    it is going into the catch block and hitting me an error instead of executing try block.Any idea why this is happening..???No and we will never know because you don't display an error message in the catch block.

  • Audio Help Under ALSA

    Hey,
    I can't get sound working (just none of it).
    According to audio via lspci | grep -i audio I have the following card:
    00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
    I followed all the directions at the arch sound wiki but to no avail...
    Here is the modules line of my rc.conf file:
    MODULES=(i2c-i801 eeprom coretemp !ath_pci wl lib80211_crypt_tkip !snd_intel8x0m)
    I really don't know anything about sound, just followed the wiki, if there's any other files/information you need that can better assist you, please let me know.
    Thanks in advance for your help.

    Ah, yes, sorry, should have known to include the grep of snd from the modules, here:
    lsmod | grep snd
    snd_seq_oss 29696 0
    snd_seq_midi_event 6004 1 snd_seq_oss
    snd_seq 47856 4 snd_seq_oss,snd_seq_midi_event
    snd_seq_device 6016 2 snd_seq_oss,snd_seq
    snd_pcm_oss 36832 0
    snd_mixer_oss 14132 2 snd_pcm_oss
    snd_hda_codec_realtek 189336 1
    snd_hda_intel 24872 1
    snd_hda_codec 60212 2 snd_hda_codec_realtek,snd_hda_intel
    snd_hwdep 6904 1 snd_hda_codec
    snd_pcsp 9228 0
    snd_pcm 66936 4 snd_pcm_oss,snd_hda_intel,snd_hda_codec,snd_pcsp
    snd_timer 19132 2 snd_seq,snd_pcm
    snd 51108 12 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcsp,snd_pcm,snd_timer
    soundcore 6112 2 snd
    snd_page_alloc 8124 2 snd_hda_intel,snd_pcm
    As for the the second command, no idea what that is, but here it is :-P.
    amixer sget PCM
    Simple mixer control 'PCM',0
    Capabilities: pvolume
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 255
    Mono:
    Front Left: Playback 217 [85%] [-7.60dB]
    Front Right: Playback 217 [85%] [-7.60dB]
    I appreciate the effort thus far, comparing the lsmod of mine to the lsmod of the arch wiki I feel that some kernel modules may have not been installed.  Although I followed all the directions for sound on the arch wiki so I don't know.

  • Runtime.exec() under Linux

    My game's installer works on windows and mac but on linux it's getting this error:
    java.io.IOException: Cannot run program "javaw": java.io.IOException: error=2, No such file or directory
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    Here's my code:
      public void runProgram(){
        String dir = folder;
        if(os_type == LINUX && dir.charAt(0) != '/'){
          dir = "/"+dir;
        File file = new File(dir+"SFC_Updater.jar");
        if(file.isFile() == false){
          System.err.println("Could not find updater jar: "+file.getPath());
          throw new RuntimeException();
        if(os_type == LINUX){
          System.err.println("Attempting to run with special linux arguments because linux is SPECIAL!");
          String[] args = new String[4];
          args[0] = "javaw";
          args[1] = "-jar";
          args[2] = "\""+dir+"SFC_Updater.jar\"";
          args[3] = dir;
          try{
          Runtime.getRuntime().exec(args);
          catch(Exception e){
           System.err.println("Linux Fails.");
           e.printStackTrace();
        else{
          try{
            Runtime.getRuntime().exec("javaw -jar \""+dir+"SFC_Updater.jar\" "+dir);
          catch(Exception e){
            e.printStackTrace();
      }Thanks

    Have you tried including the full path for javaw in
    the Linux version?It is interesting to note that the Linux version does not have a javaw

Maybe you are looking for

  • MBP Bootcamp install of USB Windows 7 , Thunderbolt Display

    We need support from APPLE! BootCamp Here are my issues. Like many users, I must abandon the marvelous os x, and head to the darkside -  Windows 7 for work. I have a MBP early 2011. I must use Bootcamp, because of the resource hogging the 3d CAD prog

  • How to handle the "cancel" button and "close" icon of a popup ?

    Hi, I have a popup with "cancel button" and "close icon"(on the top right corner of the popup), I want the same operations to be performed on clicking of any of these two components. Is there a way to handle such situation ? I read about 2 cases to l

  • Footnotes at the bottom of the page

    For anyone interested – putting the above title in the search window didn't produce anything I mean. And I welcome better ideas. I work with a Dutch language version, so I hope I use the right terms. Working on juridical textbooks with hundreds of so

  • Addressbook on Mac OSX Lion fails to quit

    Dear readers, recently I used "Addressbook" on my Macbook pro for the first time. When I command Q it to stop it from running It won't stop. Addressbook just show the rainbow loader and I have to force quit it before I can get it to stop. It eats 40

  • How To Control DVD burn speed?

    I want to burn the DVD at some speed lower than the default of 8X. How can it be controlled?