Using Groovy Swing Builder

3.21K viewsScripting
0

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?

Thanks

0

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]http://lpsolve.sourceforge.net/5.5/[/url:2boiowrd]

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

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,
Dominik

Attachments

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

Latest Questions