Answer the question
In order to leave comments, you need to log in
How to run Java code in VSCODE Windows?
Hello everyone, I’ll say right away that I’m a complete zero in your area, I found Schildt’s book on Java, for the sake of interest I read, I write even, it seems to be interesting. Until the moment with the problem (which I will indicate below), everything was fine. I set up vscode, downloaded all the java extensions, in general the code compiled, everything was fine (it was on Windows 7). A week later, I installed Windows 10 somewhere, downloaded vscode, jdk, installed the necessary extensions, but there was a problem: the code that I have left in my computer now does not start, and the new one does not work, there are no errors (well, or I don’t see them ), the debugger starts and nothing happens. I honestly tried to google, found something about PATH and so on, reinstalled extensions, jdk, nothing helps. Please advise, thanks in advance.
Answer the question
In order to leave comments, you need to log in
Good afternoon.
Well, the first thing that catches your eye is your source code (which, by the way, should be framed by the code tag, and not be added as a screenshot, according to the rules of the site). It is convenient to write code in Java using Intellij IDEA Community Edition or Eclipse.
Try to do without VSCode to start with and compile the project using the console.
Using the command, cd
change to the directory that contains the java file.
Then compile it into bytecode javac GuessTheGame.java
Then try to run your code through the command java GuessTheGame
If there are problems, then enter:
java -version
and post the result here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question