This repository was made to be able to be tested directly on your browser, here's a step by step guide on how to test it.
-
Log in to GitHub.
-
Go to the Example Java Widget repository.
-
Click on the
Codebutton, then select theCodespacestab, and finally clickCreate codespace on master(You should see a popup withSetting up ..., it may take a while to start..).
- If you are on Firefox it may not work due to your browser privacy settings. You can either switch browser or remove the tracking content in your settings to make it work, but it may reduce security protections so be careful!
- The IDE
Opening Java Projectphase is quite long, so you will need to wait for it to finish loading.. But once started, click onYesin the upcoming popup in the left corner to accept the MicroEJ SDK EULA, after reading them obviously, and build the MicroEJ project.
-
Then click on the
Reload projectbutton. -
When the project has reloaded, you can go to the
PORTStab. -
On the 6080 port, click on the preview in editor button (the little button that looks like a divided window with a magnifier).
-
It will open a Simple Browser, like the one in the screenshot below, and you will need to click on connect. This is where the simulator will be featured, so be sure to keep it open!
-
By now, the project must have been successfully loaded, you can verify this by looking at the bottom-left corner. You should only see
Java: Ready. If you have an error you should seeJava: ErrororGradle: Build Error, you can click on it to see the details. (See Troubleshooting) -
If everything is good, go to the
Gradletab (the elephant icon on the left of the editor). -
Double click on the
Tasks > microej > runOnSimulatortask to run the project in the Simulator.
- After a few seconds you should see the Example Java Widgets Application running:
-
You can now easily update the Application and quickly test your changes. For example, go to
src/main/java/com/microej/demo/widget/main/MainPage.javaand change the value of theGRAYvariable (to the color red for example:0xff0000), then click on the refresh icon next to therunOnSimulatortask to restart the simulator to see the result in the Simple Browser. -
That's it! Have fun with the MicroEJ SDK.
-
When you have
Java: ErrororGradle: Error, click on it to see the logs. One of the most common errors is Gradle not succesfully building due to the SDK EULA not correctly accepted. You can try to reload your Codespace and start again. -
This can happen when you stop and start a task, you may think a new execution process is added.. But don't worry in reality only the logs are duplicated:
<-------------> 0% CONFIGURING [90ms] > root project > Resolve dependencies of :classpath <-------------> 0% CONFIGURING [90ms] > root project > Resolve dependencies of :classpath <-------------> 0% CONFIGURING [90ms] > root project > Resolve dependencies of :classpath =============== [ Initialization Stage ] =============== =============== [ Initialization Stage ] =============== =============== [ Initialization Stage ] =============== =============== [ Initialization Stage ] =============== =============== [ Converting fonts ] =============== =============== [ Converting fonts ] =============== =============== [ Converting fonts ] =============== =============== [ Converting fonts ] =============== =============== [ Converting images ] =============== =============== [ Converting images ] =============== =============== [ Converting images ] =============== =============== [ Converting images ] =============== =============== [ Launching on Simulator ] =============== =============== [ Launching on Simulator ] =============== =============== [ Launching on Simulator ] =============== =============== [ Launching on Simulator ] =============== <===========--> 87% EXECUTING [16s] > :runOnSimulator
Markdown
Copyright 2025 MicroEJ Corp. All rights reserved.
Use of this source code is governed by a BSD-style license that can be found with this software.





