This repository contains example Java programs designed to run on FlintJVM.
It also demonstrates how to build, flash, and debug Java applications on ESP32 using the FlintJVMDebug VS Code extension.
These projects can run well on ESP32.
Before you start, make sure you have installed:
- Flash
FlintESPJVMfirmware to your ESP32 board. You can use ESP Web Tool to support flash - Use vscode and install
FlintJVM Debugextension. - Make sure you have javac (java compiler) installed and can call it in terminal window. You can also run the command
javac --versionto check.
- Open an example you want to run in vscode. For example, open the FlintExample/examples/FlintIO/Pin folder.
- Update the
portparameter in the launch.json file to match the actual port connected to your board. - To compile the project, click
Terminal > Run Build Task...or pressCtrl+Shift+B. After successful compilation, bin/Main.class file will be created. - Click
Run > Start Debuggingor pressF5to run and debug the project.
You can also open the entire project as Multi-root Workspaces by opening the FlintExample.code-workspace file.