Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Paulo J. Matos
This is my first time using SchemeWay, I've installed it and I would like to use it to create a project that uses Kawa to connect to a Java library and call Java procedures. However, first thing is that I don't see anything about New > Project > Scheme. I have New > Project but "Scheme" appears nowhere. How do I create a Scheme project?
Other than that I wonder how can I tell Eclipse to include the jar file with the Java library in the Scheme project path?
There is no such thing as a Scheme project. Simply create a "Java Project". You will be able to include the jar in the project path that way.
Is this solving your problem?
I've created a new java project and a scheme file. I've added two functions and now I'd like to be able to run the embedded kawa interpreter on these definitions or being able to send the definitions to the interpreter. I would also like be able to pass in command line arguments. Furthermore, later I would like to compile this to something I can easily run, be it an executable or javabytecode. Any ideas?
OK, thanks, yes I think my problem is solved.
First, to try your code, you'll need to switch to the Scheme perspective. Then, in the Scheme menu, choose "Select interpreter/Embedded Kawa". Finally, in your Scheme editor, press Ctrl-Shift-L to load the entire file, or press Ctrl-Enter after each definition (Ctrl-Enter sends the previous S-expression to the interpreter). Note that there is some documentation available from the "Help/Help Contents" menu item that explains all that.
If your definitions refer to Java class found in an external library, you can't use the embedded Kawa. Embedded Kawa runs in a special class loader. To do that, I usually write a small shell script that launches Kawa with a specific class path. I then select "External Interpreter" from the "Scheme/Scheme Interpreter" menu item and configure the external interpreter in the Scheme preferences page. The rest is as explained above.
If you want to pass in command line arguments, this is a different game. You'll have to compile your program using Kawa, which is something that is not supported by SchemeScript per se (SchemeScript is agnostic wrt any the Scheme system). Please refer to the Kawa reference manual.
Hope this helps,