The Artima Developer Community
Sponsored Link

Java Answers Forum
Another question about Runtime.exec()

2 replies on 1 page. Most recent reply: Jan 31, 2003 12:46 AM by Sonny

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Sonny

Posts: 9
Nickname: proban
Registered: Dec, 2002

Another question about Runtime.exec() Posted: Jan 30, 2003 2:20 AM
Reply to this message Reply
Advertisement
I know questions related to Runtime.exec() have beaten to death for many times. But searching this Forum haven't found the answer to my question. Here is the question:
Runtime.exec() will execute an external program in a different process. Is there any way to force this external program running inside a Java Frame. I mean my application is just a simple web browser with a Java Frame and embeded IE, which's called by using Runtime.exec(). It's exactly the way of using MFC to build a simple web browser.
Thanks a lot for your help.

Sonny


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Another question about Runtime.exec() Posted: Jan 30, 2003 1:27 PM
Reply to this message Reply
You wouldn't do that with Runtime.exec(). You could write lots of JNI tricks to force IE on top of your frame, but it would still have all its own window components (title bar, etc.) and the whole thing would look silly. Also, you'd have practically no control of IE.

The way to do this sort of thing is by using the IE COM control, or WebBrowser control, as it is called. I think there are probably tools for embedding COM components (or ActiveX components, as it were) in a Swing application, but I haven't looked into this; try searching google for COM and Java or COM and Swing, etc.

Sonny

Posts: 9
Nickname: proban
Registered: Dec, 2002

Re: Another question about Runtime.exec() Posted: Jan 31, 2003 12:46 AM
Reply to this message Reply
Thanks Matt.

I found a link. Think it's helpful for similar questions.

http://www.codeproject.com/java/javacom.asp#xx55124xx

Flat View: This topic has 2 replies on 1 page
Topic: parsing Previous Topic   Next Topic Topic: Security and JMF in applets

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use