Cannot resolve symbol?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #16
    This is a simple classpath problem. The javac compiler and the java virtual machine
    don't know where to look for the class file Student after it started running the
    other class. Simply add the classpath variable to them like this:

    Code:
    javac -cp . *.java 
    ...
    java -cp . ShowStudent
    The first line compiles both java files and sets the classpath to the current
    directory (it reads: minus-c-p-space-dot). The last line runs your class given the
    same classpath value.

    kind regards,

    Jos

    Comment

    Working...