Co to za blad:
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 401 for URL: http://p1.idg.pl/rss/program_tv.php?kanal=CPL
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1170)
Dodam tylko, ze w zwyklym java Aplication smiga bezblednie ;/
znacie jakies fajbe tutoriale do Java Desktop Application w NetBeans'ie?
sypie sie w tym fragmencie:
public boolean getSiteContent() throws MalformedURLException, IOException
{
URL url = new URL( address );
HttpURLConnection connection = ( HttpURLConnection ) url.openConnection();
//ponizej sie wysypuje, pod zmienna address jest: //http://p1.idg.pl/rss/program_tv.php?kanal=CPL
BufferedReader input = new BufferedReader(
new InputStreamReader( connection.getInputStream() ) );
String inputLine;
StringBuffer buffer= new StringBuffer();
while ( ( inputLine = input.readLine() ) != null ) { buffer.append( inputLine ); }
String content = buffer.toString();