Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Error compiling with custom classes #131

Open
griffinCushing opened this issue Mar 5, 2020 · 2 comments
Open

Error compiling with custom classes #131

griffinCushing opened this issue Mar 5, 2020 · 2 comments

Comments

@griffinCushing
Copy link

When linting a class, it shows an error when importing custom classes:
image

Is this caused by an incorrect .classpath file? If so, how does one create a .classpath file properly? I have found little information on its subject.

@florianb
Copy link
Contributor

florianb commented Mar 5, 2020

Hi @GC-3 - it seems like your $CLASSPATH variable isn't set correctly since javac can't resolve the symbols. The .classpath-file is generated by the Eclipse IDE and can contain references to additional classes.

It depends on your development setup if you have a .classpathfile or not. But you'll need at least a correct $CLASSPATH variable (see this help for further information) set up to hint javac where to search for your additional classes.

@Antricks
Copy link

Hello,
I was able to fix this by setting the working directory of javac to the project root dir instead of the path of the source file to be linted. I'd really appreciate a review of my PR, because if my proposed fix works on other systems too, it would improve the user experience of this package immensely, as then you wouldn't need to manually configure classpaths anymore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants