Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java, Send URL, Get URL

 
Stephen Foy
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there anyway in java to send a url to internet explorer, and get one?

Any help appreciated with this matter?
 
Yu Fei Xu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
you can vistit the url follow,maybe it can help you..
http://forum.java.sun.com/thread.jspa?messageID=4110698
 
ak pillai
author
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use the URLConnection/HttpURLConnection classes.
 
Stephen Foy
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot!
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Stephen, what does your program structure look like? I'm picturing a stand-alone Java program that you start with "java MyProgram" that is trying to start up and work with IE.

You can open IE (or whatever your default browser is) to a specified URL pretty easily.

Actually that will launch the default application for any file. There are just enough confusing issues that I'd grab some code off the web rather than start from scratch. And it won't run on other platforms.

You can't easily get information back from the browser in this structure with native Java. My team experimented with a Java COM bridge called Jacob and got a lot of good stuff going, but not quite reliably enough for production. Google for "java com bridge" and you'll find many free and commercial products.

I was just reading about Ruby Watir. If you're willing to do parts of your application in Ruby it's way cool. Again Windows only.

So was that the right guess on your architecture? Stand-alone Java and IE?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic