From owner-freebsd-questions Mon Oct 8 23: 2:40 2001 Delivered-To: freebsd-questions@freebsd.org Received: from tomts15-srv.bellnexxia.net (tomts15.bellnexxia.net [209.226.175.3]) by hub.freebsd.org (Postfix) with ESMTP id 6E63937B401 for ; Mon, 8 Oct 2001 23:02:37 -0700 (PDT) Received: from d.tracker ([65.92.120.157]) by tomts15-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20011009060231.GBRM19401.tomts15-srv.bellnexxia.net@d.tracker> for ; Tue, 9 Oct 2001 02:02:31 -0400 Received: (from david@localhost) by d.tracker (8.11.6/8.11.3) id f995vnC18903 for questions@freebsd.org; Tue, 9 Oct 2001 01:57:49 -0400 (EDT) (envelope-from david) Date: Tue, 9 Oct 2001 01:57:27 -0400 From: David Banning To: questions@freebsd.org Subject: java newbie question Message-ID: <20011009015727.A18835@sympatico.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I am starting out running jdk 1.3.1.01 and I am utilizing Walter Savitch's book on Java. While my "Hello World" program compiles & runs fine, the first example in his book utilizes a required class file. (SavitchIn.java) The first tutorial, FirstProgram.java, calls class "SavitchIn" and method "readLineNonwhiteChar", but I get the error; bash-2.03$ javac FirstProgram.java FirstProgram.java:10: cannot resolve symbol symbol : variable SavitchIn location: class FirstProgram answerLetter = SavitchIn.readLineNonwhiteChar(); It seems it cannot find the class file SavitchIn. I thought that could be handled by setting the CLASSPATH variable, but I have tried several settings with no change in result. Walter's book does not cover this, and neither does the Java tutorial I have found for starting with Sun java. I have an idea that the answer here is a simple one... The program follows; (the problem wouldn't be the ^M's would it?) public class FirstProgram^M {^M public static void main(String[] args)^M {^M System.out.println("Hello out there.");^M System.out.println("Want to talk some more?");^M System.out.println("Answer y for yes or n for no.");^M ^M char answerLetter;^M answerLetter = SavitchIn.readLineNonwhiteChar();^M if (answerLetter == 'y')^M System.out.println("Nice weather we are having.");^M ^M System.out.println("Good-bye.");^M ^M System.out.println("Press enter key to end program.");^M String junk;^M junk = SavitchIn.readLine();^M }^M } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message