fix for that one thing

https://download.bell-sw.com/java/17.0.19+11/bellsoft-jdk17.0.19+11-windows-amd64.msi

Correct download link for the liberica

it already starts with a thing called main make sure you select the full version of liberica and select controller instead of virtual robot

Virtual Robot Emulator — Android Studio Setup

Back to Java Programming Learning Path

Step-by-step guide to run the FTC Virtual Robot emulator in Android Studio. No hardware required.

⚠ Known issue: A specific setup error has been documented separately. See the fix article if you run into it.
Before you begin: Complete all steps in order. Skipping the JDK step is the #1 cause of setup failures.

1 Install the Liberica JDK 17 Full

Critical — Full version required. The emulator uses JavaFX, which is only included in the Full JDK. Standard JDK, Oracle JDK, and Amazon Corretto will not work.
  1. Go to bell-sw.com/pages/downloads
  2. Select Version 17, Full JDK, and your OS (Windows or Mac)
  3. Download and run the installer — accept all defaults

2 Install Android Studio

  1. Go to developer.android.com/studio
  2. Download and install with all defaults
  3. When the Setup Wizard runs on first launch, let it complete fully — it downloads the Android SDK automatically
  4. Click Next through all component prompts and wait for the install to finish before continuing

3 Clone the Repository

  1. From the Android Studio Welcome screen, click Get from VCS
  2. Make sure Git is selected on the left
  3. Paste this URL into the URL field:
https://github.com/ARES-23247/virtual_robot.git
  1. Leave the Directory field as the default, or choose your preferred location
  2. Click Clone
  3. If prompted “Trust this project?” — click Trust Project
  4. Wait for Gradle to finish syncing — this can take several minutes the first time

4 Point Android Studio to Liberica JDK

Required. Android Studio uses its own bundled JDK by default. You must switch it to Liberica 17 Full or the emulator will crash on launch.
  1. Go to File → Project Structure
    Windows shortcut: Ctrl+Alt+Shift+S  |  Mac shortcut: Cmd+;
  2. Click SDK Location on the left panel
  3. Under JDK location, click the dropdown → Add JDK…
  4. Navigate to the Liberica install folder:

    Windows: C:\Program Files\BellSoft\LibericaJDK-17-Full

    Mac: /Library/Java/JavaVirtualMachines/liberica-jdk-17-full.jdk/Contents/Home
  5. Click OK — confirm the JDK location now shows the Liberica path
  6. Click Apply → OK

5 Set the Run Configuration

  1. Click the dropdown at the top toolbar — it may say app or No Configurations
  2. Click Edit Configurations…
  3. Click the + button → select Application
  4. Fill in these three fields:
FieldValue
NameMain
Modulevirtual_robot — not Controller or TeamCode
Main classvirtual_robot.main.Main
  1. Click OK

6 Run the Emulator

  1. Click Build → Rebuild Project and wait for it to finish with no errors
  2. Click the green Run ▶ button, or press Shift+F10
  3. The Virtual Robot window opens on your screen
  4. In the Configurations dropdown — select Programming Board
  5. In the OpModes dropdown — select any available OpMode
  6. Click INIT then START
✔ Setup complete — if the emulator window opens and the Programming Board is visible, everything is working correctly.

7 Where Students Write Their Code

Students only ever work inside the TeamCode module. Never touch Controller/ or virtual_robot/.

virtual_robot/                 ← DO NOT TOUCH
  Controller/               ← DO NOT TOUCH
  TeamCode/                 ← STUDENTS WORK HERE ONLY
    src/
      org/firstinspires/ftc/
        teamcode/           ← ALL OpModes go here
          mechanisms/     ← ProgrammingBoard1.java goes here

8 Creating a New OpMode

  1. In the Project panel, expand TeamCode → src → org → firstinspires → ftc → teamcode
  2. Right-click the teamcode folder → New → Java Class
  3. Name your class (e.g. LJCh06)
  4. Add @TeleOp(name="...") directly above the class declaration
  5. Add extends OpMode to the class declaration
  6. Click Build → Rebuild Project
  7. Your new OpMode now appears in the emulator’s OpModes dropdown
Creating the mechanisms package: Right-click teamcodeNew → Package → type mechanisms. Then right-click mechanismsNew → Java Class → name it ProgrammingBoard1.

! Troubleshooting

⚠ Known issue: If you hit a specific error during setup, see the fix article.
ProblemLikely CauseFix
App crashes on launchWrong JDK installedRedo Step 4 — must use Liberica JDK 17 Full
Gradle sync failsAndroid SDK not installedLet the Android Studio Setup Wizard complete fully
OpMode not in dropdownProject not rebuilt after changesBuild → Rebuild Project
NullPointerException on INITWrong hardware device nameNames must match exactly: "motor" "servo" "touch_sensor" "pot" "sensor_color_distance" "imu"
Run button grayed outNo run configuration setRedo Step 5
OpMode missing from listMissing @TeleOp annotationAdd @TeleOp(name="YourName") directly above the class declaration