FreeJ2ME Plus
Active fork of FreeJ2ME.
Current status
Links to FreeJ2ME-Plus Builds
:question: What is it?
FreeJ2ME-Plus is a J2ME emulator with libretro and AWT frontends, it aims to run on basically anything that can run a Java VM.
Original authors :
- David Richardson [Recompile@retropie]
- Saket Dandawate [Hex@retropie]
Current maintainer:
- Paulo Sousa [AShiningRay]
:bar_chart: Compatibility list
For a general idea of what can or cannot run, look HERE
:gear: :coffee: Building FreeJ2ME-Plus
Make sure you have Apache Ant installed and can run it. Then, from the freej2me directory, run the following command (yes, it's that simple):
> antThat command will create two different jar files inside
build/:
freej2me.jar-> Standalone AWT jar executable, can be double-clicked right away to start
freej2me-lr.jar-> Libretro executable (has to be placed on the frontend'ssystem/folder, since it acts as a BIOS for the libretro core and is what runs J2ME jars)NOTE: The Libretro jar file needs additional binaries to be compiled before use. Look at the additional steps below if you're going to use it.
:gear: :video_game: Building the Libretro core
Building for Linux:
To build the libretro core, be sure you can run the
makecommand, then open a terminal in freej2me's folder run the following commands from there:# libretro core compilation > cd src/libretro > makeThis will build
freej2me_libretro.soonsrc/libretro/, which is the core libretro will use to interface withfreej2me-lr.jar.Move it to your libretro frontend's
cores/folder, with freej2me-lr.jar onsystem/and the frontend should be able to load j2me files afterwards.NOTE: The core DOES NOT WORK on containerized/sandboxed environments unless it can call a java runtime that also resides in the same sandbox or container, keep that in mind if you're running a libretro frontend through something like flatpak or snap for example.
Building for Windows:
To build the libretro core for windows, first you'll need mingw, or MSYS2 64.
This guide uses MSYS2as it's easier to set up and works closer to linux syntax.Download MSYS2-x86_64 and install it on your computer. By default it will create a linux-like 'home' folder on C:\msys64\home\ and will put a folder with your username in there. This is where you have to move the freej2me folder to, so:
C:\msys64\home\USERNAME\freej2mefolderfor example.With the folder placed in there you can build the core, open the MSYS2 UCRT64 terminal from your pc's start menu, and run the following commands:
# Installing 'mingw-w64' and 'make' on msys2 > pacman -S mingw-w64-ucrt-x86_64-gcc > pacman -S make # libretro core compilation > cd freej2mefolder/src/libretro > makeThis will build
freej2me_libretro.dllonfreej2mefolder/src/libretro/, which is the core libretro will use to interface withfreej2me-lr.jar.Move it to your libretro frontend's
cores/folder, with freej2me-lr.jar onsystem/and the frontend should be able to load j2me files afterwards.NOTE: The windows core has been tested on Windows 7, 10 & 11 x64.
:memo: How to use the AWT frontend:
Launching the AWT frontend (freej2me.jar) directly will bring up the standalone GUI, where you can load your application through the File menu, or by dragging and dropping your JAR/JAD/KJX/MSD file onto it.
You can also configure many aspects of the runtime, including debug options:
Alternatively it can be launched from the command line with the following arguments:
fullscreen:arrow_right:1 = yes, 0 = nowidth:arrow_right:self explanatory, it's the virtual LCD's widthheight:arrow_right:also self explanatory, it's the virtual LCD's heightscale:arrow_right:for windowed mode, dictates the scale that FreeJ2ME-Plus' window starts with.- '2' will make it 2X bigger than the original width and height size for example
- Note that using the '+' and '-' keys also let you scale the window by an integer factor of +-1
keyLayout:arrow_right:specifies which device key layout should be used when booting up.These can be:0 -> Default1 -> LG2 -> Motorola/Softbank3 -> Motorola Triplets4 -> Motorola V85 -> Motorola A10006 -> Nokia Keyboard7 -> Sagem8 -> Siemens9 -> Sharp10 -> SKT11 -> KDDI
framerate:arrow_right:sets the maximum FPS applications are allowed to run at.- Can be any value, although '10' to '60' is the expected ballpark
dojaversion:arrow_right:sets the DoJa/Star profile for the I-Appli to use.These can be:10 -> Default20 -> DoJa 2.0 & International 1.530 -> DoJa 3.0 & International 2.535 -> DoJa 3.540 -> DoJa 4.041 -> DoJa 4.150 -> DoJa 5.051 -> DoJa 5.1100 -> Star 1.0110 -> Star 1.1120 -> Star 1.2130 -> Star 1.3150 -> Star 1.5200 -> Star 2.0
Those are organized and read internally in this manner: java -jar freej2me.jar 'file:///path/to/midlet.jar' fullscreen width height scale keyLayout framerate dojaversion
Although all arguments aside from the path are optional to launch FreeJ2ME-Plus with any given app.
Notes:
When running under Microsoft Windows please do note paths require an additional / prefixed. For example, C:\path\to\midlet.jar should be passed as file:////C:\path\to\midlet.jar
FreeJ2ME keeps savedata and config at the working directory it is run from. Currently any settings specified at the config file take precedence over the values passed via command-line.
:mag: Modules and external dependencies used:
JLayer(MPEG Player): - LGPLv2.1 License, compatible with GPLv3
libsdl4j: zlib License, compatible with GPLv3
ObjectWeb's ASM: BSD 3-Clause License, not directly compatible with GPLv3, but can be used as long as the original license is published alongside GPLv3 (check the 'License' tab)
Libretro's API: MIT License, compatible with GPLv3
Roman Lahin rmn20's MascotCapsuleV3 renderer (MascotME): MIT License, compatible with GPLv3
:busts_in_silhouette: How to contribute
If you're a developer:
- Open an Issue
- Try solving that issue
- Post on the Issue if you have a possible solution
- Submit a PR implementing the solution
If you're an user:
- Open an Issue
- Explain it in as much detail as you can (FreeJ2ME-Plus version, jar used, md5 hash, as well as the issue with logs and images if possible)
- Post a save file close to where the issue manifests, or note the steps required to reproduce it