I looked through a few questions similar to this but mine is too specific for them to help. For one of my classes at school, I need to run an extension to Java called Hadoop. I have fully configured my Hadoop and have it working in my terminal (which I am SSHed into) but the JDK of my VSCode (which is also connected via SSH) doesn’t recognize that Hadoop exists (likely because they are not looking at the same JDK).
I am getting hundreds of errors when trying to import things and define classes in my code but it can compile fine because the terminal recognized Hadoop. It’s mostly annoying because I want to see where the legitimate errors are.
I am still getting an error because I have not completed the assignment but at least Hadoop is recognized by the compiler.
In the above image, you can see that I tried to change the JDK path to one of the ones provided to me in the terminal but it says there’s nothing there. I have also tried to go the command to "Install New JDK" to see if it would let me use an existing one but it does not. This is all on SSH which is why I am having so much trouble. If I left anything out, please let me know and I will add it in.
Any help would be appreciated, thanks!
>Solution :
In VS code ,Seems like your Hadoop jars are not part of your class path ,hence vs code is not able to recognize the import .
If you are not using maven/Gradel you may have to import them manually as below
Please refer to this question on how to add external jars in vs code.
Visual Studio Code, Java Extension, how to add a JAR to classpath?


