SquirrelJME Usage

This covers all variants of SquirrelJME, for specific variant documentation please see:

Command Line Usage

The following may be used at the command line, the format is the same as java. An option within square brackets [] are optional, and any option within parenthesis () are required. The usage of SquirrelJME is in the following format:

The available options are:

Default Directories

SquirrelJME has a set of default directories, which have a priority order and may be overridden by environment variables.

Any entry with {~} means the first character will be placed by your home directory, <HOME> on POSIX or <USERHOME> on Windows.

The following replacements are intended to be used in multi-arch setups. Note that the system and architectures must be of the names used by SquirrelJME.

The directory types and their order of precedence are:

Runtime Library Order

SquirrelJME will attempt to load its runtime library in this specific order in either the [Runtime Library] directory or the [Data] directory if the former is not set.

Common Issues

TRYING TO RUN DoJa/Star (i-mode) SOFTWARE?: Both DoJa and Star require the accompanying .jam file to be able to load the titles as the Jar has no information itself on how to start such titles. Some DoJa/Star software will also require the .sp (Scratchpad) file as it relies on DLC which must have already been downloaded, considering the services for downloading such DLC are no longer online.

Environment and System Properties

System properties and environment variables are additional available in specific cases to modify default behavior of SquirrelJME from the command line.

Environment variables always take priority over system properties. Note that system properties are only available to the runtime, if a system is ultimately initialized purely in the native layer then system properties will have no effect.

Framing/Scaling

SquirrelJME supports framing and scaling of any MIDP Canvas, to override the default scale factor you may specify:

ScritchUI Interface

The following ScritchUI interfaces are provided by SquirrelJME, assuming that they are built and included:

It is possible with the combination of the natives path and/or vendor-specific builds of SquirrelJME to have additional libraries available. Libraries placed in the natives path should have their name match the system that they are for.

Vendor-specific keycodes

SquirrelJME supports adjusting its input keycodes to match those of specific vendors.

Special file: URIs

These are special file: URIs in SquirrelJME, specified by using a special authority. Within each authority, there may be an URI encoded target, this is specified in brackets (<>). Note that it is shown here as being unencoded so that it is readable and understood. This means that if the contained value is <file://hello/> this will be encoded as file%3A%2F%2Fhello%2F.

An example of referring to a library as a ZIP:

Using the Media Player from the Command Line

The media player may be started purely from the command line with the specified command:

Note if you are on any UNIX/Posix system and are using Bash you will need to quote URLs as Bash will try to interpret any exclamation point (!).

The following commands are available:

Listing contents will give a tab (\t) separated output in three columns:

For example, split into three rows:

inode/directory
file://!%3Fx-squirreljme-library%3A%2F%2F%3F!system-app-media-player.jar/
system-app-media-player.jar/

Then from the second argument, to list the contents of the JAR, copy the URL and run the list command:

This will give another list of tab (\t) separated columns:

audio/midi
file://!%3Fx-squ<TRUNCATED>yer.jar/11-Stucked-Convoi.mid
11-Stucked-Convoi.mid

Then to play the media, copy the URL into the given command with its content type:

If you place the media file in the data and/or library directory, which is where non-volatile data is stored or your applications are installed, you can then play it via:

While playing the output will be as followed. Progress updates will always end in carriage return (\r) so that the last line is replaced. The starting tilde (~) may be used to synchronize the output to find the next set of messages to parse, while the ending caret (^) may be used to synchronize the end of a line. The synchronization is mostly useful if you are parsing the output from a script or another program, and you are not able to differentiate between stdout and stderr as reliably.

The output template followed by an example:

~PlayerType: [99h 59m 59s 999999µs / 99h 59m 59s 999999µs] State (999)^
~MidiPlayer: [06s 244790µs / 04m 11s 812500µs] Started (400)^

States are as followed:

The song will continue playing until it reaches the end.

Natives

Natives within SquirrelJME follow the same format as the host system:

This should only be used as a baseline as a vendor and/or specific distribution may use a different format.

System and Architecture Names

SquirrelJME generally follows the proper name for a system and/or architecture in the naming scheme.

Architectures

The following names are used for architectures:

Systems

The following names are used for systems: