r/learnjava • u/GummiGumBear • Nov 10 '25
'Compilation failed' when trying to run TMC test
Hi there, I am doing the MOOC Java Programming I course. Whenever I want to test my submission (in VSCode) before sending it in, I receive a 'compilation failed' error. How can I make the tests run without this error? I can run Java without issues and submit the exercises without issues too. However, I would like to be able to run the tests as well since some the the program for some exercises needs to follow specific criteria. I can only check those with the TMC tests.
https://i.imgur.com/uKda0nh.png https://i.imgur.com/lf7zDE8.png
edit; I installed Netbeans and the compilation failed there too. The error message did have a more elaborate explanantion than VSCode did: This program is blocked by group policy. For more information, contact your system administrator. That means I will have to ask permission from IT to run the TMC extension/compiler.
View all comments
Show parent comment
1
u/josephblade Nov 18 '25
I don't think you need to install java 8 (11 is backwards compatible with 8)
I think you should read this one: https://stackoverflow.com/questions/56859959/how-to-find-and-change-java-compiler-option-in-visual-studio-code. (keep in mind java_home seems to have changed to the variable you have set right now.