Results 1 to 6 of 6
  1. #1
    noJava is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default getRuntime().exec Doesn't Work in FireFox.

    I've written an Applet that uses Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler " + url); to open a new browser window. I've tested this in every browser I could (Opera, Chrome, IE, etc...)

    The Applet fails to open a new browser when Run in Firefox. Regardless of the Default Browser in the system. (I can load firefox, but only from another browser).

    I've implemented getRuntime().exec in order to work around the ShowDocument pop-up blocked issue. I hope this made sense, and that I described my particular issue well enough.

    -cheers
    -wes

  2. #2
    noJava is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default

    after some debugging.... It's a file Access Error

    java.io.FileNotFoundException: file.txt (Access is denied)

    ONLY IN FIREFOX?

    I was reading about Firefox's New Java Plugin (with FF 3.6)- could this have to do with anything?

  3. #3
    NRitH is offline Senior Member
    Join Date
    Feb 2011
    Posts
    118
    Rep Power
    0

    Default

    Quote Originally Posted by noJava View Post
    after some debugging.... It's a file Access Error

    java.io.FileNotFoundException: file.txt (Access is denied)

    ONLY IN FIREFOX?

    I was reading about Firefox's New Java Plugin (with FF 3.6)- could this have to do with anything?
    Are you saying that this works in other browsers? It's not a browser issue; it's a security settings issue. By default, applets are not allowed to do many things that ordinary applications can--access the file system, make certain system calls, etc. You need to relax these restrictions in your browser settings.

  4. #4
    noJava is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default

    I'm deploying the applet in a signed jar.
    The applet runs (with no exceptions) in other browsersl IE, Safari, Opera, Chrome, etc...

    The applet also makes some Socket connections (this part works fine in FF).

  5. #5
    NRitH is offline Senior Member
    Join Date
    Feb 2011
    Posts
    118
    Rep Power
    0

    Default

    Quote Originally Posted by noJava View Post
    I'm deploying the applet in a signed jar.
    The applet runs (with no exceptions) in other browsersl IE, Safari, Opera, Chrome, etc...

    The applet also makes some Socket connections (this part works fine in FF).
    Ah, that's a different story, then. And one for which I have no answer.

  6. #6
    noJava is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default

    thanks for the replies.

    after much debugging I came to find that it wasn't the Exec method that was failing. For some reason (in Firefox, I can only speculate it's because of Firefox's Next Gen(tm) Java Plugin) My applet fails when accessing the file system. "Access Denied" - granted, this is only in Firefox (haven't tested other netscape-type browsers)

Similar Threads

  1. Runtime.getRuntime().exec() and pppd
    By mysticav in forum Networking
    Replies: 7
    Last Post: 02-15-2011, 08:44 PM
  2. Replies: 5
    Last Post: 07-07-2010, 01:50 PM
  3. Slow Output reading with Runtime.getRuntime().exec()
    By gmcouto in forum Advanced Java
    Replies: 8
    Last Post: 05-14-2010, 11:42 AM
  4. help with Runtime.getRuntime().exec
    By collin389 in forum AWT / Swing
    Replies: 3
    Last Post: 11-09-2009, 05:22 AM
  5. Problem with Runtime.getRuntime().exec with Linux Commands
    By swapnilnawale in forum Threads and Synchronization
    Replies: 1
    Last Post: 09-23-2009, 11:23 PM

Posting Permissions

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