LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-03-2003, 12:28 PM   #1
bboyewal
LQ Newbie
 
Registered: Sep 2003
Posts: 2

Rep: Reputation: 0
[Java]-cannot resolve symbol SavitchIn Please help!!!


I created a program called FirstProgram.java which references the class satvitchin (basically a program to receive data from the keyboard) it can be found here: lander.edu/jdileo/Fall03/CS180/downloads/SavitchIn.java
i have both satvitchin and firstprogram in the same directory, i compile satvichin with no problems then when i try to compile firstprogram i get this error:

C:\Documents and Settings\David Walton\Desktop\School\CS 180\FirstProgram.java:10: cannot resolve symbol
symbol : variable SavitchIn
location: class FirstProgram
answerLetter = SavitchIn.readLineNonwhiteChar();
^
C:\Documents and Settings\David Walton\Desktop\School\CS 180\FirstProgram.java:18: cannot resolve symbol
symbol : variable SavitchIn
location: class FirstProgram
junk = SavitchIn.readLine();
^
2 errors

Tool completed with exit code 1
------------------------------------------------------------------------
when i compile at school everything works fine this is the code for firstprogram:

public class FirstProgram
{
public static void main(String[] args)
{
System.out.println("Hello out there.");
System.out.println("Want to talk some more?");
System.out.println("Answer y for yes or n for no.");

char answerLetter;
answerLetter = SavitchIn.readLineNonwhiteChar();
if (answerLetter == 'y')
System.out.println("Nice weather we are having.");

System.out.println("Good-bye.");

System.out.println("Press Enter key to end program.");
String junk;
junk = SavitchIn.readLine();
}
}
------------------------------------------------------------------------
is it something with the path?
java is looking in the wrong directory for the class file it needs?
thanks
 
Old 09-03-2003, 12:49 PM   #2
bboyewal
LQ Newbie
 
Registered: Sep 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Found the answer nevermind
 
Old 09-05-2003, 03:54 AM   #3
shinu_scorpion
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
/**Friend Try this */

import java.io.*;
public class FirstProgram
{
public static void main(String[] args)throws IOException
{
System.out.println("Hello out there.");
System.out.println("Want to talk some more?");
System.out.println("Answer y for yes or n for no.");

String answerLetter;
BufferedReader SavitchIn=new BufferedReader(new InputStreamReader(System.in));

answerLetter = SavitchIn.readLine();

if (answerLetter.equals("y"))
System.out.println("Nice weather we are having.");

System.out.println("Good-bye.");

System.out.println("Press Enter key to end program.");
String junk;
junk = SavitchIn.readLine();
}
}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't get this | symbol Plitter Linux - Newbie 14 11-09-2005 04:15 PM
not able to resolve name mihunt Linux - Networking 3 09-29-2005 02:58 AM
cannot resolve name moonmoth Linux - Newbie 8 07-15-2005 04:32 PM
snort failed: snort: symbol lookup error: undefined symbol: usmAES192PrivProtocol Emmanuel_uk Linux - Security 1 07-10-2005 10:29 AM
how to symbol link your Java to be able to use in Mozilla. waheedrafiq Linux - Software 6 08-10-2003 03:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration