I'm trying to edit an Eclipse Photon JEE Dynamic Web Project in VSCode. It has the "Apache Tomcat v8.5" library on the build path. In VSCode it lists problems stemming from "message": "The import javax.servlet cannot be resolved".
The .classpath file seems to point to it. The jar that I need should be in there.
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.5"/>
Is what I'm doing supported by the Java Extension Pack?
Furthermore, I tried another non-JEE library, 'Apache Commons Lang' and I have the same issue.
The import org.apache cannot be resolved
Where this was added to my .classpath file:
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Apache Commons Lang v3.7"/>
So I think the issue is the relative imports eclipse uses. Yet it's not clear to me if an absolute import is possible or how it would be implemented to be portable to VSCode.
You're depending on libraries provided by a full blown Eclipse (Java EE) + configured server installation. I don't think it's reasonable to expect vscode-java to support that.
Pure Eclipse project support in vscode-java is limited to simple java projects. If you want full classpath dependency support, you need to use either Maven or Gradle.
Sorry but we have no plans on supporting yet another project descriptor.
Would it possible to have a little more constructive feedback? I am stuck on this issue too, I did not have it before, it just kind of suddenly happen. @marlinla did you solve this problem?