Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2008
    Rep Power

    Default Error during file open

    String file = "C:\\Documents and Settings\\mit2kor\\Desktop\\1 1 1 1.txt";
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + file);

    I get an 'Unable to open "C:\Documents and Settings\mit2kor\Desktop\1 1 1 1.txt"' error message, when the code snippet is run. Enclosing the variable 'file' within a double quote also does not work.

    Can anybody help?
    Thank you in advance....

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    //cmd= rundll32 url.dll,FileProtocolHandler file://D:/www/index.html
    My notes show the above for a cmdline

Similar Threads

  1. open a pdf file in linux
    By aparna in forum Advanced Java
    Replies: 5
    Last Post: 06-08-2010, 01:51 PM
  2. how to open a file through URL
    By katie in forum New To Java
    Replies: 3
    Last Post: 07-13-2008, 03:53 AM
  3. Open File
    By JavaLerner in forum SWT / JFace
    Replies: 5
    Last Post: 07-12-2008, 07:41 PM
  4. To open an image file such as Jpeg file using JAva Program
    By itmani2020 in forum Advanced Java
    Replies: 10
    Last Post: 07-11-2008, 10:57 AM
  5. Is it possible to open a txt file?
    By jason27131 in forum New To Java
    Replies: 20
    Last Post: 08-07-2007, 02:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts