Home arrow static arrow Java Programming [Archive] - simple url question
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - simple url question
This topic has 6 replies on 1 page.

Posts:106
Registered: 20.04.04
simple url question  
Jul 20, 2004 5:41 AM



 
hi,
i try to open the standard webbrowser by a java-desktop-api using:

URL url = new URL("http://myurl");
URLConnection connection = url.openConnection();

but nothing happens.... :-(

thanks for help
gammloop
 

Posts:24,036
Registered: 2/3/03
Re: simple url question  
Jul 20, 2004 5:45 AM (reply 1 of 6)



 
Oh, my.

[url=http://www.javaworld.com/javaworld/javatips/jw-javatip66.html]Control browsers from your Java application[/url]

It's an extremely important skill to learn to read the API and become familiar with the tools you will use to program Java. Java has an extensive set of [url=http://java.sun.com/reference/api/index.html]documentation[/url] that you can even [url=http://java.sun.com/docs/index.html]download[/url] for your convenience. These "javadocs" are indexed and categorized so you can quickly look up any class or method. Take the time to consult this resource whenever you have a question - you'll find they typically contain very detailed descriptions and possibly some code examples.

http://java.sun.com/reference/api/index.html
http://java.sun.com/j2se/1.4.2/docs/api/

Here are some tutorials that may get you further along with the basics:
http://java.sun.com/docs/books/tutorial/
http://java.sun.com/developer/onlineTraining/Programming/BasicJava1/compile.html
http://java.sun.com/learning/new2java/index.html
http://javaalmanac.com
http://www.jguru.com
http://www.javaranch.com
Bruce Eckel's [url=http://mindview.net/Books/DownloadSites]Thinking in Java[/url]
Joshua Bloch's [url=http://www.amazon.co.uk/exec/obidos/Author=Bloch,%20Josh]Effective Java[/url]
Bert Bates and Kathy Sierra's [url=http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance]Head First Java[/url]
 

Posts:319
Registered: 11/8/00
Re: simple url question  
Jul 20, 2004 5:58 AM (reply 2 of 6)



 

It's an extremely important skill to learn to read the API and become familiar with the tools you will use to program Java. Java has an extensive set of documentation that you can even download for your convenience. These "javadocs" are indexed and categorized so you can quickly look up any class or method. Take the time to consult this resource whenever you have a question - you'll find they typically contain very detailed descriptions and possibly some code examples.

http://java.sun.com/reference/api/index.html
http://java.sun.com/j2se/1.4.2/docs/api/


Here here, do you have that text on some sort of shortcut key? reading the API seems to be a dying art!
I might add that reading the forums is also a good idea, there have been loads of repeats of questions only raised the day before.
 

Posts:106
Registered: 20.04.04
Re: simple url question  
Jul 20, 2004 6:01 AM (reply 3 of 6)



 
thank you for your advice.
the url - problem works now. :-)
 

Posts:24,036
Registered: 2/3/03
Re: simple url question  
Jul 20, 2004 6:04 AM (reply 4 of 6)



 
Here here, do you have that text on some sort of
shortcut key?

Yep. I keep a variety of stock responses on hand, as the same questions get asked over and over, and so on ad infinitum. They typically cover at least 80% of the OP's question and save the trouble of typing the same response.

Of course, I've also been accused of being a running software service that automatically posts based on certain questions.... :o)
 

Posts:21,719
Registered: 98-02-20
Re: simple url question  
Jul 20, 2004 6:11 AM (reply 5 of 6)



 
We had the Turing Test, but now it's the Yawmark Test: Is that a human being sending the stock answers back or a computer program?

<Simpsons>
Aye, that's no man. It's a remorseless eating beast!
</Simpsons>

I envy that file. Man, you've got some great stuff in there.

It's too bad that it couldn't be posted as FAQs, but those can be ignored just as easily as a forum search. I think noobs like the personal touch of getting the answer from The Man himself. ;)

%
 

Posts:24,036
Registered: 2/3/03
Re: simple url question  
Jul 20, 2004 6:37 AM (reply 6 of 6)



 
I envy that file. Man, you've got some great stuff in there.

You're welcome to it, and thanks. I'm sure it could stand some revision. :o)
 
This topic has 6 replies on 1 page.