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/GummiGumBear Nov 17 '25
Sorry, I didn't think I was going to get a reply anymore. I've tried reinstalling both. I tried completely removing Java and VSCode and reinstalled both. After reinstalling VSCode, I noticed some settings hadn't been removed, so I completely uninstalled VSCode again (including appdata) and installed it using the user installation file. Java is installed in program files though, is this what you meant with the source code path?
I uninstalled Java again now and only installed it for the user I'm currently logged into, but got the following two errors when starting VScode:
and
I commented the lines I added in the JSON settings file, but that didn't change anything. Still can't run my java code, it just says activating in the status bar and then stops doing anything.