I have developed a Java app on my Windows laptop using VS Code. The app was always intended to run on a Raspberry Pi400, and I did not realise that VS Code could also run on the Pi until the development was almost complete. It would of course be much more effective to finish and debug the app on the actual target machine. So I installed Code on the Pi, added the Java extensions, and copied the project folder across. I edited the settings.json file in the .vscode subfolder of the project to correctly point to the referenced libraries the app uses in their new location on the Pi.
I thought I should then be able simply to open the folder in VS Code and it would see it all as a Java project. It sort of does, but sort of doesn't. Nothing happens until I click on one of the java source files, but when I do, the following things happen:
The JAVA PROJECTS pane appears in the left sidebar under the EXPLORER pane. A blue underline starts repeatedly marching across the pane under the words JAVA PROJECTS. A spinning icon appears at the right end of the blue status bar at the bottom of the screen.
This is all expected, and is what happens on the Windows laptop when I open the folder. But the difference is that on the Pi it never completes the process. The JAVA PROJECTS pane never gets populated, and the spinning icon at the bottom never stops spinning. So I simply cannot work with the project on the Pi, which was the objective of all this. It seems likely that something VS Code needs is missing, but I cannot see what. If anyone has any ideas it would be very good to sort this out. I should point out that this is not a Maven project - it was created as a "no build tools" project, which worked fine on Windows.
EDIT: I've just found that this is nothing to do with my moved project. If I try to create a new Java project on the Pi, starting from nothing, the exact same thing happens. So if it is something missing, it is missing from the VS Code installation, not anywhere in my project. I thought it might be that I had not configured the Java runtime yet, but I cannot do that until I have a project.