Invoke a Java class by name Follow
My DSL generates Java code but I also have an interpreter that works on MPS.
For the operators, it's very simple to provide the behaviour and collect the result; however my DSL also provides functions which are available as Java Jar files.
I don't want to statically refer to the Java classes/methods, so I tried to use dynamic loading but I can never find these classes.
Has anyone tried out a scenario like this?
Any suggestions?
Sérgio Ribeiro
Portugal.
For the operators, it's very simple to provide the behaviour and collect the result; however my DSL also provides functions which are available as Java Jar files.
I don't want to statically refer to the Java classes/methods, so I tried to use dynamic loading but I can never find these classes.
Has anyone tried out a scenario like this?
Any suggestions?
Sérgio Ribeiro
Portugal.
Please sign in to leave a comment.
If someone else has this problem: I was adding the JARs as stubs but what I should have done was add them as Libraries in the solution (see pic).
After this step, dynamic loading worked perfectly.