How to Use VSCode with MOOC.fi Java Course (Instead of NetBeans)
The Problem
I wanted to take the University of Helsinki’s MOOC.fi Java programming course, but the course materials heavily recommend NetBeans. I already use VSCode for everything else - Python, JavaScript, Markdown. I didn’t want to install another heavy IDE just for one course.
I searched for alternatives. Reddit threads mentioned VSCode works with MOOC.fi, but the instructions were scattered. Some said “just copy-paste to NetBeans when done” which sounded tedious.
The question was: Can I actually use VSCode with full MOOC.fi integration, or would I be stuck with a crippled workflow?
Environment
- macOS (same process works on Windows/Linux)
- VS Code 1.85+
- Java 17 (OpenJDK)
- No NetBeans installed
What I Found
MOOC.fi officially supports VSCode through the TMC (Test My Code) extension. This wasn’t obvious from the course landing page, which pushes NetBeans heavily. But after digging, I found official documentation at mooc.fi/en/installation/vscode/.
The TMC extension handles:
- Downloading course exercises
- Running local tests
- Submitting solutions to the TMC server
- Tracking progress
This meant I could use VSCode without sacrificing any course functionality.
The Setup Process
Step 1: Install Java Development Kit
First, I needed JDK. I checked if I already had it:
java -versionIf you see “java: command not found”, you need to install it.
On macOS:
brew install openjdk@17On Windows:
choco install openjdkOn Linux (Ubuntu/Debian):
sudo apt install openjdk-17-jdkVerify installation:
java -versionjavac -versionI saw something like:
openjdk version "17.0.9" 2023-10-17OpenJDK Runtime Environment Homebrew (build 17.0.9+0)OpenJDK 64-Bit Server VM Homebrew (build 17.0.9+0, mixed mode, sharing)Step 2: Install Java Extensions in VSCode
I opened VSCode and installed the Extension Pack for Java. This bundle includes:
- Language Support for Java (Red Hat)
- Debugger for Java
- Test Runner for Java
- Maven for Java
- Project Manager for Java
- IntelliCode
Quick install via Command Palette (Cmd+Shift+P / Ctrl+Shift+P):
ext install vscjava.vscode-java-packAfter installation, VSCode took a minute to download and initialize the Java Language Server. I saw a notification saying “Opening Java Projects…” in the status bar.
Step 3: Install TMC Extension
This is the key piece. The TMC (Test My Code) extension connects VSCode to MOOC.fi’s exercise system.
Install via Quick Open (Cmd+P / Ctrl+P):
ext install moocfi.test-my-codeAlternatively, search for “Test My Code” in the Extensions panel (Cmd+Shift+X).
After installation, I saw a new “TMC” icon in the Activity Bar (left sidebar). This is the TMC Commands panel.
Step 4: Configure TMC
I opened the TMC panel and clicked “Login”. The extension prompted for my mooc.fi credentials. If you don’t have an account, create one at mooc.fi (free).
After logging in, I needed to select a course:
- Click “Select Course” in the TMC panel
- Choose “Java Programming I” or “Java Programming II”
- Select your organization (University of Helsinki or other partner)
Then I downloaded exercises:
- Click “Download Exercises”
- Choose a folder location (I used
~/Projects/mooc-java) - Select which week’s exercises to download (start with Week 1)
Step 5: Understanding the Project Structure
The TMC extension created this structure:
mooc-java/├── src/│ └── Part01/│ └── Part01_01.Sandbox/│ ├── src/│ │ └── Main.java│ └── test/│ └── MainTest.java├── lib/│ └── junit-4.10.jar└── .tmcproject.ymlEach exercise has:
src/- Your code goes heretest/- Hidden tests (you don’t see these before submission).tmcproject.yml- TMC configuration
Important: Open the project folder in VSCode (not individual files). The Java Language Server needs the folder context to work properly.
Step 6: Completing an Exercise
I opened Part01_01.Sandbox/src/Main.java:
public class Main { public static void main(String[] args) { // Write your code here
}}I wrote a simple solution:
public class Main { public static void main(String[] args) { System.out.println("Hello MOOC!"); }}Step 7: Running Tests
In the TMC panel, I clicked “Run Tests”. The extension ran local tests and showed results in the output panel.
TMC: Running tests for Part01_01.Sandbox...[INFO] Scanning for projects...[INFO][INFO] ----------------< tmc:Part01_01.Sandbox >----------------[INFO] Building Part01_01.Sandbox 1.0[INFO] --------------------------------[ jar ]---------------------------------[INFO][INFO] --- exec-maven-plugin:3.0.0:java (test) @ Part01_01.Sandbox ---Running tests...Tests: 1, Failures: 0, Skipped: 0
[PASS] All tests passed!When tests passed, I clicked “Submit to Server” in the TMC panel. The extension uploaded my solution and I got feedback:
TMC: Submitting to server...Submission accepted!Points: 1/1You can view the submission at: https://tmc.mooc.fi/submissions/...Common Issues I Hit
Issue 1: Java Language Server Not Starting
After opening the project, I saw errors like “Java Language Server crashed” or no autocomplete.
The problem: VSCode didn’t recognize the project as a Java project because I opened it as a folder, not specifically configured for Java.
Fix:
- Make sure you opened the folder (File > Open Folder), not just a file
- Check if JDK is in your PATH:
java -version - Reload VSCode window: Cmd+Shift+P > “Developer: Reload Window”
- If still broken, check the Java extension is enabled
Issue 2: TMC Extension Won’t Connect
The TMC panel showed “Not logged in” repeatedly even after entering credentials.
The problem: Credentials weren’t saved or network was blocked.
Fix:
- Logout first: TMC panel > “Logout”
- Login again with correct credentials
- If using a corporate network, check if firewall blocks tmc.mooc.fi
- Clear TMC cache: Cmd+Shift+P > “TMC: Clear Cache”
Issue 3: Tests Fail Locally but Pass on Server
This happened when my solution had timing issues or platform-specific code.
The problem: Local test environment differs slightly from TMC server.
Fix:
- Don’t rely on system-specific paths or timing
- Make tests deterministic (no random values without seeds)
- Check the TMC output for specific error messages
Issue 4: Wrong Java Version
I got errors about Java version incompatibility.
The problem: The course exercises target Java 8+, but I had a different version configured.
Fix in settings.json:
{ "java.configuration.runtimes": [ { "name": "JavaSE-17", "path": "/path/to/jdk-17", "default": true } ]}VSCode vs NetBeans for MOOC
After using VSCode for a few weeks, here’s my comparison:
| Feature | VSCode | NetBeans |
|---|---|---|
| Startup time | ~2 seconds | ~10 seconds |
| Memory usage | ~400MB | ~800MB |
| TMC integration | Full support | Full support |
| Learning curve | Medium | Higher |
| Extensions | 30,000+ | ~1,500 |
| Industry adoption | Very high | Moderate |
VSCode advantages:
- Lightweight - runs well on older hardware
- Same editor for Java, Python, JavaScript
- Excellent Git integration built-in
- IntelliCode for AI-assisted completions
- Larger community = more Stack Overflow answers
NetBeans advantages:
- Course materials reference it directly
- Zero setup - works out of the box
- Better Java-specific refactoring tools
- More integrated Maven support
If you’re already comfortable with VSCode, stick with it. The TMC extension provides feature parity for the course.
The Architecture
Here’s how the pieces connect:
┌─────────────────┐│ VS Code ││ (Your Editor) │└────────┬────────┘ │ ┌────┴────┐ │ │ ▼ ▼┌───────┐ ┌─────────────┐│ Java │ │ TMC ││ Pack │ │ Extension │└───┬───┘ └──────┬──────┘ │ │ ▼ ▼┌───────┐ ┌─────────────┐│ JDK │ │ TMC Server ││ │ │ (mooc.fi) │└───────┘ └─────────────┘ │ │ ▼ ▼┌───────────────────────┐│ Your Java Exercise ││ (.java files) │└───────────────────────┘The Java extension provides language support (autocomplete, debugging, error checking). The TMC extension handles exercise management (download, test, submit). They work together on your Java files.
Tips I Wish I Knew Earlier
Use Keyboard Shortcuts
I set up shortcuts for common TMC actions:
Cmd+Shift+T R- Run testsCmd+Shift+T S- Submit to serverCmd+Shift+T D- Download exercises
Configure in VSCode’s Keyboard Shortcuts (Cmd+K Cmd+S).
Version Control Your Progress
I initialized Git in my mooc-java folder:
cd ~/Projects/mooc-javagit initgit add .git commit -m "Initial commit"After each exercise, I commit:
git add .git commit -m "Complete Part01_01.Sandbox"This saved me once when I broke my code and needed to revert.
Debug with Breakpoints
VSCode’s Java debugger works with TMC exercises. I can set breakpoints, step through code, and inspect variables. This helped me understand complex loops.
Click next to a line number to set a breakpoint, then F5 to start debugging.
Keep Extensions Updated
The TMC extension gets updates. Check periodically:
- Open Extensions panel
- Search for “Test My Code”
- Click “Update” if available
Updates fix bugs and add features.
Summary
I set up VSCode to work with MOOC.fi’s Java course using the TMC extension. The full integration means I can download exercises, run tests, and submit solutions without leaving VSCode.
The setup takes about 10 minutes:
- Install JDK
- Install Extension Pack for Java
- Install TMC extension
- Login to mooc.fi
- Download exercises
I avoided installing NetBeans, kept my familiar VSCode workflow, and maintained full course functionality. If you’re already a VSCode user, there’s no reason to switch IDEs for this course.
Final Words + More Resources
My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me
Here are also the most important links from this article along with some further resources that will help you in this scope:
- 👨💻 MOOC.fi VSCode Installation Guide
- 👨💻 TMC Extension on VSCode Marketplace
- 👨💻 VS Code Java Tutorial
- 👨💻 Java Programming I MOOC Course
- 👨💻 Java Programming II MOOC Course
Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!
Comments