3

OK, like many of the package compiling issues out there I have not found one like this out of the 12 hours I've spent searching..

Basically I have the normal setup :

My Directories are as follows: JavaCSVReader/FRC_API

My Source files are setup as this:

JavaCSVReader/CSVFile.java
JavaCSVReader/FRC_API/RobotConfig.java 

(that is CSVFile.java is located in JavaCSVReader and same for RobotConfig.java)

CSVFile.java contains the lines:

    package JavaCSVReader;
    import JavaCSVReader.FRC_API.*;
       ...

RobotConfig.java contains the lines:

    package JavaCSVReader.FRC_API;
    import JavaCSVReader.CSVFile;
        ...

Both files compile fine without the lines above.

The error is thus: I receive

"cannot find symbol... class: CSVFile location: JavaCSVReader" 

when I try to compile the RobotConfig.java.

I also receive the

"package does not exist: JavaCSVReader.FRC_API" error when compiling CSVSFile.java

my

CLASSPATH=/home/src/JavaCSVReader/:.:.. 

(I am using linux)

3 Answers 3

4

Your classpath setting is wrong. You should set it to

/home/src/

The compiler will take classpath as the "base" directory in order to find packages defined in the source.

Sign up to request clarification or add additional context in comments.

Comments

0

it's a classpath issue. How do you configure java environment variables? You'd better check on it.

Comments

0

is your package JavaCSVReader.FRC_API; or JavaCSVReader ?

1 Comment

THe package is JavaCSVReader.FRC_API. The issue was the classpath. I was not sure on the meaning of the term base class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.