Processing with Scala
in
Processing with Other Languages
•
9 months ago
I've found out how to use jar files made with Scala within Processing. The process is pretty simple. Once you have your jar ready and your Scala class that recieves the applet, just download and paste scala-library.jar into the lib folder of processing.
For exported apps I only know how to setup linux. I'm sure someone more knowledgeable could get windows set up but I could only test it in wine. Copy scala-library.jar into the lib folder and edit the bash script and add $APPDIR/lib/scala-library.jar to the classpath.
Accessing Sala methods is normal. But to access properties, Sala makes getter and setter methods for them. To get the property object.foo use object.foo(). To change the value use, object.foo_$eq(<data>). Otherwise it seems to be working the same.
If someone could give me info on getting the windows executable to work let me know :)
[also] Make sure you're using the same scala-library.jar version as the version you're programming with.
[update]
It works on windows as well, just rebooted into it and tried it myself. Just add the scala-library.jar like before and add it to the args.txt.
For exported apps I only know how to setup linux. I'm sure someone more knowledgeable could get windows set up but I could only test it in wine. Copy scala-library.jar into the lib folder and edit the bash script and add $APPDIR/lib/scala-library.jar to the classpath.
Accessing Sala methods is normal. But to access properties, Sala makes getter and setter methods for them. To get the property object.foo use object.foo(). To change the value use, object.foo_$eq(<data>). Otherwise it seems to be working the same.
If someone could give me info on getting the windows executable to work let me know :)
[also] Make sure you're using the same scala-library.jar version as the version you're programming with.
[update]
It works on windows as well, just rebooted into it and tried it myself. Just add the scala-library.jar like before and add it to the args.txt.