To install the Cyan compiler:
– choose File/New/Java project
– type “saci” as the project name
– click ‘finish’
– in the Windows Explorer, copy the directories of
the compiler (uncompressed from ‘src.zip’) to
the directory ‘src’ of this new project.
– in the ‘Package Explorer’, put the mouse pointer on the project
name, ‘saci’. Right click it and choose option ‘Java Build Path’.
– click tab ‘Libraries’ and ‘Add External JARs’
– click ‘next’
– type the directory in which the external JARs are and choose all
– click ‘OK’
– click in menu ‘Project’ and choose ‘clean’ and ‘ok’
– choose menu ‘Run/Run configurations/Java application’. Press
the ‘New’ button to create a configuration of the selected type,
which is ‘Java application’.
– in Main/Main class, choose ‘Saci – saci’
– in ‘Run/Run configurations/Arguments’ type
“C:\Dropbox\Cyan\cyanTests\simple” -cyanlang “C:\Dropbox\Cyan\lib” -javalib “C:\Dropbox\Cyan\lib\javalib”
change the directories accordingly. In this case we assume that there is a cyan program at
After -cyanlang, type the directory in which you uncompressed file ‘lib.zip’. After -javalib, type the directory that is after ‘-cyanlang’ with ‘\javalib’ added at the end. The first directory is
where your Cyan source code is. Inside it there should be at least one directory, the main one. Usually it is called ‘main’. Inside ‘main’ there should be at least one Cyan source code. Usually the main prototype is called ‘Program’ and it is put in a file called ‘Program.cyan’.
– now you can press ‘Run\Run configurations\Run’ to compile and run the Cyan source code.
Sometimes the compiler is not able to delete the output directory in which it puts the generated Java code. If the compiler warns this, delete yourself this directory using either the Windows Explorer or, better, the 7z File Manager. Because of long file names, it is possible that none of these programs is able to delete the directory. In this case, open a DOS window, go to the directory with the long file names and rename them. Now you can delete the files.