volatile474 Posted June 15, 2018 Share Posted June 15, 2018 (edited) Hello all, I am new to the osbot script development community (wrote some scripts for a different bot back in the day). Was wondering if anyone has had experience building scripts in a language that compiles down to Java (scala, kotlin, etc). I am working on a simple POC (fish, chop trees, cook, repeat) in scala and running into a bunch of classdefnotfound exceptions during runtime. ie: ``` java.lang.NoClassDefFoundError: scala/collection/Seq java.lang.NoClassDefFoundError: scala/math/Ordering ``` I have tried packaging scala into the jar through intelliJ's project structure page, but no positive results. This is probably because the OSBot client doesn't package the scala jars itself, and just dynamically loads the selected script? (but not that script's dependencies) Would love to be able to write these scripts in scala, code looks much cleaner that way. Any suggestions would be much appreciated. Edited June 15, 2018 by volatile474 removed references to censored text. Quote Link to comment Share on other sites More sharing options...
Alek Posted June 15, 2018 Share Posted June 15, 2018 Jesus how big are your scripts going to be? Is it even worth it if your scripts are 100MB downloads? Quote Link to comment Share on other sites More sharing options...
volatile474 Posted June 16, 2018 Author Share Posted June 16, 2018 The size of script doesnt matter if it's all local The syntactic benefits of using scala far outweighs any concerns around sizing of the jar, also it isnt nearly that big lol. Quote Link to comment Share on other sites More sharing options...
volatile474 Posted June 16, 2018 Author Share Posted June 16, 2018 Well... I admit defeat, unless I can add scala jars as core dependencies of the osbot client, dont think any scala features will compile. Java it is I suppose Quote Link to comment Share on other sites More sharing options...
Alek Posted June 18, 2018 Share Posted June 18, 2018 On 6/15/2018 at 10:25 PM, volatile474 said: The size of script doesnt matter if it's all local The syntactic benefits of using scala far outweighs any concerns around sizing of the jar, also it isnt nearly that big lol. Seems hardly worth the effort for a preference in style Quote Link to comment Share on other sites More sharing options...