Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not set classpath of the project "Failed to update classpaths: Error: Cannot invoke "org.eclipse.jdt.core.IClasspathEntry.getPath()" because "rawClasspath[i]" is null" #126

Open
XiaoHuang opened this issue Oct 21, 2024 · 1 comment

Comments

@XiaoHuang
Copy link

Created a very simple hello world java project. Followed every step in the README, but the java files are not recognized with the error
"xxx.java is not on the classpath of project java, only syntax errors are reported"

I then try to add the classpath manually with "Java:Configure Classpath", and I got this error message

[Error - 10:49:20 PM] Oct 20, 2024, 10:49:20 PM src [in java] does not exist src [in java] does not exist Java Model Exception: Error in Java Model (code 969): src [in java] does not exist at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:562) at org.eclipse.jdt.internal.core.PackageFragmentRoot.getUnderlyingResource(PackageFragmentRoot.java:762) at org.eclipse.jdt.internal.core.PackageFragment.getUnderlyingResource(PackageFragment.java:430) at org.eclipse.jdt.internal.core.Openable.getUnderlyingResource(Openable.java:329) at org.eclipse.jdt.internal.core.CompilationUnit.getUnderlyingResource(CompilationUnit.java:967) at org.eclipse.jdt.ls.core.internal.handlers.BaseDiagnosticsHandler.collectNonJavaProblems(BaseDiagnosticsHandler.java:191) at org.eclipse.jdt.ls.core.internal.handlers.BaseDiagnosticsHandler.endReporting(BaseDiagnosticsHandler.java:142) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.reportProblems(ReconcileWorkingCopyOperation.java:141) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:110) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:739) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:804) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1303) at org.eclipse.jdt.ls.core.internal.handlers.BaseDocumentLifeCycleHandler.publishDiagnostics(BaseDocumentLifeCycleHandler.java:332) at org.eclipse.jdt.ls.core.internal.handlers.BaseDocumentLifeCycleHandler.publishDiagnostics(BaseDocumentLifeCycleHandler.java:295) at org.eclipse.jdt.ls.core.internal.handlers.BaseDocumentLifeCycleHandler$PublishDiagnosticJob.run(BaseDocumentLifeCycleHandler.java:777) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Any help would be grateful. Thanks in advance!

@guw
Copy link
Contributor

guw commented Oct 21, 2024

Can you share the simple project?

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

No branches or pull requests

2 participants