Using Groovy Swing Builder

4.15K viewsScripting

This seems not to be possible with the current security policy.

The builder capability requires to introspect the methods of the Swing components. Any Swing Builder invocation fails with:
[font=”Courier New”]access denied (java.lang.RuntimePermission accessDeclaredMembers)[/font]

I did try to modify the permissions in the policy file in the .subx_configuration directory but it seems that Quantrix resets those on start up.

Is it your intention to prevent use of Swing Builder? Is there a way to change the policy file as a workaround in the short-term?



Hi Simon,
Hi Quantrix developers,

Simon, thank you for bringing up this issue. I have a similar issues when I try to use lp_solve within Quantrix: [url:2boiowrd][/url:2boiowrd]

To access lp_solve from Quantrix you have to add this file to the ScriptingLibs folder:

Installation of lp_solve:

1) Copy the lp_solve dynamic libraries from the archives lp_solve_5.5_dev.(zip or tar.gz) and lp_solve_5.5_exe.(zip or tar.gz) to a standard library directory for your target platform.

2) On Windows, a typical place would be WINDOWS or WINDOWSSYSTEM32.

3) Unzip the Java wrapper distribution file to new directory of your choice.
On Windows, copy the wrapper stub library lpsolve55j.dll to the directory that already contains lpsolve55.dll.

When I run the test script (see the attached file “lpsolve.model”) the I get this message:
“Error running script: access denied (java.lang.RuntimePermission loadLibrary.lpsolve55j”

Like Simon, I tried to change the permission settings in Quantrix but I wasn’t successful either.

I fully understand that the security has a high priority. That’s very important. But it would be great if we could use external libraries like lp_solve or optimJ (another freely available solver API). This willallow us to add solver capabilities to Quantrix.

The attached zip file contains:
– lpsolve.model (including a sample Groovy script -> click the button on the Canvas)
– lpsolve55j.jar
– lpsolve55.dll
– lpsolve55j.dll

All the best,

You are viewing 1 out of 3 answers, click here to view all answers.