Why can't I run my java file with script?


I understand that you can’t run by selection on java with the package script, but if I don’t select anything and do ctrl-shift-b, it comes up with the same error on every single one of my projects.

" ‘javac’ is not recognized as an internal or external command, operable program or batch file."


According to that error, you need to install Java. As you can see from the text of the error, it originates from your operating system, so script has done its job successfully. However, there is nothing at the name you’ve asked for (javac), so you get that error.


I have installed a jdk and every other software I have used worked to run it (Intellij,netbeans,etc.)


You might have downloaded a JDK, but javac is not in a folder listed on your PATH variable. The official instructions for installing Java say that you need to add that manually.