To use this website fully, you first need to accept the use of cookies. By agreeing to the use of cookies you consent to the use of functional cookies. For more information read this page.

Official ZPE Programming Environment documentationRunning ZPE

There are many ways to run ZPE as described on the information page. This page will outline all modes and how to use them.

From the GUI

It's really easy to run ZPE from the operating systems graphical user interface (GUI) by simply double clicking on the zpe.jar file that you would get from the download. This will open the graphical editor and is the same as using the zpe -g command.

This is the easier method of running ZPE and all features are available through this method, but ZPE was originally designed as a command line programming language so bear that in mind if you want the fullness of ZPE at your disposal.

From the command line

Before that, we need to open a command line on our computer. On macOS this is called Terminal. On Windows it is called PowerShell. Get familiar with your command line terminal before attempting to use ZPE.

First of all navigate (using the cd command) to the directory in which you have put the zpe.jar file. If you have chosen to install ZPE using the installer for macOS and Linux you can skip this step.

Now you need to run the ZPE program. To do so, type:

Command line
java -jar zpe.jar

If you have already installed it correctly using the macOS and Linux installer, you can simply type (you can type this anywhere on your system):

Command line

Hopefully we will get a spiel about what ZPE version you are using and a bunch of information about the commands accepted. This is good.

The next step is to run ZPE with a ZPE Access Command or ZAC. A ZAC is the main way into the program, they are all specified below with their arguments that need to be provided to get them to do something.

-a : Analyse code

This mode is used to analyse code to ensure it will compile. It will tell you if your code from a file is actually valid.

zpe -a $filename
-b : Byte codes

Prints a byte code tokenisation of the program.

zpe -b $filename
-c : Compile mode

Compile mode. Compiles the code to a file for distribution. Version 1.5.1 makes the -n argument optional. The -library parameter allows the compiler to compile the program as a library which will force the compiler to remove any main functions from the program.

zpe -c $file_to_compile [-o $output_file] [-library $library] [-optimise $optimise]
-d : Debug mode

Debug mode is still in experimental stages but it can be used to debug to a certain line of code.

zpe -d $file_to_debug_path [-t $max_number_of_traverses -v $return_variable]
-e : Export mode

Exports code to another language (transpiles). (experimental/alpha). There already exists a small YASS to Python transpiler.

zpe -e $filename -o $file_out -n $class_name -t $language_type
-g : GUI mode

GUI mode. This mode features a basic GUI for editing and running code.

zpe -g
-h : Help mode

Shows the available help commands and provides access to them. There are four options for $mode as follows: -h info which retrieves the information about the ZPE program; -h doc -f $filename [-s $function_name ] which will read any internal documentation within a compiled application; the -h commands which lists all commands within ZPE when loaded. The -h config will list configuration settings for the current installation.

zpe -h $mode [arguments]
-i : Interactive mode

Interactive mode. Interactive interpreter for commands from the command line. Real time interactive shell mode. This is perhaps the most useful way to learn the syntax and workings of ZPE and YASS as it will allows you to see immediate results.

zpe -i [$code_string] [-level $permission_level]
-j : JSON mode

JSON communication mode. Executes a command or script formatted in JSON. This mode requires the JSON file specified to contain a ZPE file at the end of it within a file property, a parameters property that contains all parameters, and an optional output property to specify where to write the results. This is, in essence, how cross-language communication is performed in ZPE.

zpe -j $filename
-n : Network mode

Network remote server. Opens a ZPEServer or a ZPEClient. The $port specified is the local or server port to open or connect to. The $host should be an IP address. By giving it a host parameter, the ZPE system knows that this instance is a client rather than a server.

The $permission_level argument can only be provided to a server and has no effect on the client.

zpe -n $port [-h $host] [-level $permission_level]
-p : Properties mode

Allows viewing and editing of ZPE properties.

zpe -p
-q : Quickfire mode

A GUI single instance that reads in code, runs it and displays the output. This can be used to evaluate mathematical expressions right from the input.

zpe -q
-r : Runtime mode.

Runtime mode. Compiles and runs code using the compiler and runtime.

zpe -r $file_path [-level $permission_level] [-args arguments]
-s : String view

String mode. Prints a string tokenisation of the program. The $clean_up argument changes the code to a clean string representation of the code.

zpe -s $file_path [-c $clean_up]
-t : Tree view

Tree mode. Prints the code tree of the code from a file.

zpe -t $file_path
-v : Version number

Version number. Prints the current version number to the console.

zpe -v [--json] [--verbose]
-w : Web parser

Executes a HTML page with ZPE code.

zpe -w $file_path
Run ZPE program

Runs a compiled ZPE application at a specified file path. This mode can also be used to run a non-compiled program similar to the -i mode, but does not support arguments with these programs.

zpe $file_path [arguments]
Other modes

Further to the above specified modes, there are other modes that can be run directly from the console.

zpe --configure
Configure mode. Runs the initial configuration scripts and sets the default configuration.
zpe --man $entry_name
Manual mode. Searches out internal documentation for an internal function, much like the Unix man pages.
zpe --update
Update mode. Basic updater mode that will check for an update to ZPE.
zpe --zule list
zpe --zule install $file [-d $zpe_directory]
ZULE mode. The ZULE or ZPE Uploaded Library Extensions repository is a collection of a libraries and extensions that have been added by users. All libraries are first assessed to ensure stability, performance and integrity.

There are no comments on this page.

New comment
Provide feedback on this page
Comments are sent via email to me.