The instructions that follow are for installing the Cyan compiler in the Eclipse IDE. The steps are:
– choose File/New/Java project
– type “saci” as the project name
– click ‘finish’
– 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’
– choose the following jar files of directory ‘lib’ created from file lib.zip downloaded from this site: commons-lang3-3.8.1.jar, cyan.lang.jar, cyan.reflect.jar, and reflections-0.9.9-RC1.jar
– still in ‘Libraries’ make sure ‘JRE System Library’ uses jdk1.8
– click ‘Apply and Close’
– 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
change the directories accordingly. In this case we assume that there is a cyan program at
Inside C:\Cyan\cyanTests\myFirstProgram 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.
– to create a ‘saci.jar’ file, go to Package Explorer, click on the Cyan compiler project, choose ‘Export’ and then ‘Runnable JAR file’
– to create a .exe file in Windows, use launch4j
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. If this does not work, use IObit Unlocker