From owner-freebsd-java Fri Aug 16 8:53:37 2002 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B342037B400 for ; Fri, 16 Aug 2002 08:53:35 -0700 (PDT) Received: from frankenstein.nwlink.com (pop.nwlink.com [209.20.130.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2263A43E4A for ; Fri, 16 Aug 2002 08:53:35 -0700 (PDT) (envelope-from branden@portentinteractive.com) Received: from niss (ip201.portent.sea.interquest.net [66.135.149.201]) by frankenstein.nwlink.com (8.11.3/8.11.3) with ESMTP id g7GFrU205557 for ; Fri, 16 Aug 2002 08:53:30 -0700 (PDT) (envelope-from branden@portentinteractive.com) Content-Type: text/plain; charset="us-ascii" From: Branden Root Reply-To: branden@portentinteractive.com Organization: Portent Interactive To: freebsd-java@freebsd.org Subject: re: hanging threads in IDEA Date: Fri, 16 Aug 2002 08:49:24 -0700 User-Agent: KMail/1.4.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200208160849.24173.branden@portentinteractive.com> Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org What's funny is my class doesn't actually use threads. I just wrote it as a sample test for IDEA's features. Here's the code: package utils; import java.net.*; import java.io.*; public class GetURL { private static String location = "http://www.yahoo.com"; public static void main(String[] argv) { try { URL newUrl = new URL(location); BufferedReader bin = new BufferedReader(new InputStreamReader(newUrl.openStream())); String output; while ((output = bin.readLine()) != null) { System.out.println(output); } bin.close(); } catch (Exception e) { System.out.println("Error:" + e); } } } Nothing fancy... -- Branden Root Web Developer Portent Interactive To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message