Running Junicon

Running interactively

To run Junicon interactively, just type or click on:

		junicon
	
or
		junicon.exe
	
for Linux/MacOS or Windows, respectively.

In interactive mode you can enter commands one line at a time to see the results. Junicon is actually translating your Unicon programs to run on Groovy, which is another interpreter written in Java, so you can freely use any Java classes or Groovy features.

Running a script file

To run a script file, type:

		junicon MyScript.icn [arguments...]
	
or, to run the script but keep in interactive mode, type:
		junicon -i MyScript.icn [arguments...]
	

Compiling Junicon

To a standalone executable

To compile a Junicon program to an standalone executable, type:

		junicon -e MyScript.icn
	
To run the compiled program, just type:
		MyScript [arguments...]
	
The executable will use JAVA_HOME as the location of Java if it is defined; otherwise the executable looks in PATH to find the Java runtime, i.e., java or java.exe. Alternatively, you can directly run the self-contained jar:
		java -jar MyScript [arguments...]
	

To an executable without the runtime

By default, compilation produces a self-contained executable jar. To produce an executable without the Junicon runtime bundled in, type:

		junicon -e -R MyScript.icn
	
In this case the executable will look in the CLASSPATH environment variable to find the Junicon runtime and any other dependencies.

To a jar file

You can also just compile to a jar file, and not produce an executable:

		junicon -C MyScript.icn
	
In this case the jar file will not include the runtime or any other dependencies. To extract a copy of the junicon runtime to add to the classpath, type:
		junicon -Xr
	

To a Java file

Lastly, to translate a program to Java, but not compile it, type:

		junicon -T MyScript.icn
	
To see other command-line options, run:
		junicon -h
	

Configuring Junicon

You can customize the behavior of Junicon by editing its startup files. Normally, junicon uses the startup files bundled into its self-contained executable. To modify its configuration, first extract the startup files:

		junicon -Xc
	
which extracts them to a config directory. After modification, you can run Junicon with the new configuration by typing:
		junicon -Ic yourConfigDirectory
	

Documentation

Documentation can be found at

		unicon.org/junicon
	
A description of the Unicon programming language can also be found using the Unicon link at the top of this page. A description of Junicon's extensions to Unicon can be found in the Junicon Reference Card.