Results 1 to 6 of 6
- 02-22-2011, 10:42 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 4
- Rep Power
- 0
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
- 02-23-2011, 07:13 PM #2
Member
- Join Date
- Feb 2011
- Posts
- 4
- Rep Power
- 0
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?
- 02-23-2011, 07:21 PM #3
Senior Member
- Join Date
- Feb 2011
- Posts
- 118
- Rep Power
- 0
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.
- 02-23-2011, 08:36 PM #4
Member
- Join Date
- Feb 2011
- Posts
- 4
- Rep Power
- 0
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).
- 02-23-2011, 09:43 PM #5
Senior Member
- Join Date
- Feb 2011
- Posts
- 118
- Rep Power
- 0
- 02-25-2011, 01:39 PM #6
Member
- Join Date
- Feb 2011
- Posts
- 4
- Rep Power
- 0
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
-
Runtime.getRuntime().exec() and pppd
By mysticav in forum NetworkingReplies: 7Last Post: 02-15-2011, 07:44 PM -
Java/Ubuntu: Runtime.getRuntime().exec(..) gives an error
By t500yo in forum New To JavaReplies: 5Last Post: 07-07-2010, 12:50 PM -
Slow Output reading with Runtime.getRuntime().exec()
By gmcouto in forum Advanced JavaReplies: 8Last Post: 05-14-2010, 10:42 AM -
help with Runtime.getRuntime().exec
By collin389 in forum AWT / SwingReplies: 3Last Post: 11-09-2009, 04:22 AM -
Problem with Runtime.getRuntime().exec with Linux Commands
By swapnilnawale in forum Threads and SynchronizationReplies: 1Last Post: 09-23-2009, 10:23 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks