Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

cannot resolve symbol  RSS feed

 
Siva kandasamy
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Why do I get this exception ?
Code and error message is appended below.



1. Exception message
=====================
javac RhymingWords.java
RhymingWords.java:28: cannot resolve symbol
symbol : class ReverseThread
location: class RhymingWords
new ReverseThread(out, in).start();
^
RhymingWords.java:41: cannot resolve symbol
symbol : class SortThread
location: class RhymingWords
new SortThread(out, in).start();
^
2 errors




Code:
=====================



word.txt
===================

 
Joyce Lee
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The compiler couldn't find the ReverseThread.java and SortThread.java in the current directory. You need these two files in order to compile successfully.

Joyce
[ August 04, 2004: Message edited by: Joyce Lee ]
 
Jack Kay
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
new ReverseThread(out, in).start();

1. Make sure start() is not static.
2.
The compiler couldn't find the ReverseThread.java and SortThread.java in the current directory. You need these two files in order to compile successfully.


You need not the java files inside of the same directory. You need the CLASS files in the same directory. OR, you can have all of the source (.java) files in the same directory, and then compile like this:

javac *.java

Peace out!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!