Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot resolve symbol, class error

 
t_loww
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to java, but understand the fundamentals of classes, but when I compile code that references a class in the same directory I get an error that the compiler can't find the class named.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"t_loww",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to make sure that you Path and Classpath variables are set correctly.
The path needs to include the directory that has the other classes in it. Something like
c:\jdk1.3\bin;%PATH%;
or
SET PATH=%PATH%;%JAVAHOME%\BIN

The classpath (for executing) has to contain the directory that the JRE jar files are in and the directories that you have your class.
Here is the official doco on how to set them: http://developer.java.sun.com/developer/onlineTraining/Programming/BasicJava1/windows.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic