<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — java, showing news at startup...]]></title>
		<link>https://punbb.informer.com/forums/topic/4818/java-showing-news-at-startup/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/4818/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in java, showing news at startup....]]></description>
		<lastBuildDate>Thu, 07 Oct 2004 18:46:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: java, showing news at startup...]]></title>
			<link>https://punbb.informer.com/forums/post/22863/#p22863</link>
			<description><![CDATA[<div class="codebox"><pre><code>public int news(String web)
{
String temp = &quot;Error&quot;; int a = 0;
try
{
URL url = new URL(web);
URLConnection urlconnection = url.openConnection();
BufferedReader input = null;
input = new BufferedReader(new InputStreamReader(urlconnection.getInputStream()));
while((temp = input.readLine()) != null)
{
  line[a] = temp;
  a++;
}
}
catch(Exception e){System.out.println(e);}
return a;
}</code></pre></div><div class="codebox"><pre><code>System.out.println(&quot;Deobed by teh lovable Kaitnieks&quot;);
        System.out.println(&quot;Checking for updates...&quot;);
        System.out.println(&quot;&quot;);
        System.out.println(&quot;&quot;);
        try{Thread.sleep(1500);}
        catch(InterruptedException _ex){}
        System.out.println(&quot;+*********************************************************+&quot;);
        System.out.println(&quot;+                      Updater                            +&quot;);
        System.out.println(&quot;+*********************************************************+&quot;);
        System.out.println(&quot;+-+-+-+-+-+-+*=  You have version 1.6 =*+-+-+-+-+-+-+-+-+-+&quot;);
        System.out.println(&quot;+          The newest version is version &quot; + checkupdate(&quot;http://www.kylebot.net/bot_data/version.txt&quot;) + &quot;              +&quot;);
        System.out.println(&quot;+      If you need to update, get the newest version      +&quot;);
        System.out.println(&quot;+              from http://www.kylebot.net                +&quot;);
        System.out.println(&quot;+*********************************************************+&quot;);
        System.out.println(&quot;&quot;);
        System.out.println(&quot;&quot;);
        System.out.println(&quot;Getting the news....&quot;);
        try{Thread.sleep(1500);}
        catch(InterruptedException _ex){}
        System.out.println(&quot;+*********************************************************+&quot;);
        System.out.println(&quot;+                         News                            +&quot;);
        System.out.println(&quot;+*********************************************************+&quot;);
        System.out.println(&quot;+-+-+-+-+-+-+-+*= KyleBot version 1.6 =*+-+-+-+-+-+-+-+-+-+&quot;);
        int length = news(&quot;http://www.kylebot.net/bot_data/news.txt&quot;);
        for(int a = 0;a &lt; length;a++)
            System.out.println(line[a]);
        System.out.println(&quot;+*********************************************************+&quot;);
    }</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Reines)]]></author>
			<pubDate>Thu, 07 Oct 2004 18:46:07 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/22863/#p22863</guid>
		</item>
		<item>
			<title><![CDATA[java, showing news at startup...]]></title>
			<link>https://punbb.informer.com/forums/post/22860/#p22860</link>
			<description><![CDATA[<p>hi i want my prog to show the news when i start it up, so far i have this:-<br /></p><div class="codebox"><pre><code>public void news(String web)
{
String temp = &quot;Error&quot;; int a = 0;
try
{
URL url = new URL(web);
URLConnection urlconnection = url.openConnection();
BufferedReader input = null;
input = new BufferedReader(new InputStreamReader(urlconnection.getInputStream()));
while((temp = input.readLine()) != null)
{
  line[a] = temp;
  a++;
}
}
catch(Exception e){System.out.println(e);}
}</code></pre></div><p>and this is the thing that displays it:-</p><div class="codebox"><pre><code>        System.out.println(&quot;Deobed by teh lovable Kaitnieks&quot;);
        System.out.println(&quot;Checking for updates...&quot;);
        System.out.println(&quot;&quot;);
        System.out.println(&quot;&quot;);
        try{Thread.sleep(1500);}
        catch(InterruptedException _ex){}
        System.out.println(&quot;+*********************************************************+&quot;);
        System.out.println(&quot;+                      Updater                            +&quot;);
        System.out.println(&quot;+*********************************************************+&quot;);
        System.out.println(&quot;+-+-+-+-+-+-+*=  You have version 1.6 =*+-+-+-+-+-+-+-+-+-+&quot;);
        System.out.println(&quot;+          The newest version is version &quot; + checkupdate(&quot;http://www.kylebot.net/bot_data/version.txt&quot;) + &quot;              +&quot;);
        System.out.println(&quot;+      If you need to update, get the newest version      +&quot;);
        System.out.println(&quot;+              from http://www.kylebot.net                +&quot;);
        System.out.println(&quot;+*********************************************************+&quot;);
        System.out.println(&quot;&quot;);
        System.out.println(&quot;&quot;);
        System.out.println(&quot;Getting the news....&quot;);
        try{Thread.sleep(1500);}
        catch(InterruptedException _ex){}
        System.out.println(&quot;+*********************************************************+&quot;);
        System.out.println(&quot;+                         News                            +&quot;);
        System.out.println(&quot;+*********************************************************+&quot;);
        System.out.println(&quot;+-+-+-+-+-+-+-+*= KyleBot version 1.6 =*+-+-+-+-+-+-+-+-+-+&quot;);
        System.out.println(news(&quot;http://www.kylebot.net/bot_data/news.txt&quot;));
        System.out.println(&quot;+*********************************************************+&quot;);
    }</code></pre></div><p>The update part works but that only reads 1 line, the other 1 (news) reads 20 lines i think. the error i get when i compile is this:-</p><div class="codebox"><pre><code>mudclient.java:283: &#039;void&#039; type not allowed here
        System.out.println(news(&quot;http://www.kylebot.net/bot_data/news.txt&quot;));
                               ^
1 error
Press any key to continue . . .</code></pre></div><p>plz can some1 give me the FULL code to fix it i mean if i need to add somthing just tell me EXACLY what to add and where, i dont usualy c/p its just that i&#039;m goin 2 florida at 9:00am 2morrow.</p>]]></description>
			<author><![CDATA[null@example.com (SpAZ)]]></author>
			<pubDate>Thu, 07 Oct 2004 18:35:17 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/22860/#p22860</guid>
		</item>
	</channel>
</rss>
