Login  Register

Re: ReferenceError: "importPackage" is not defined in <eval>

Posted by karenacollins on Jan 22, 2020; 7:59am
URL: http://astroimagej.170.s1.nabble.com/ReferenceError-importPackage-is-not-defined-in-eval-tp1274p1275.html

Hi Lars,

Unfortunately I don't have any experience writing JAVA script for AIJ or IJ. Does your script work under plain ImageJ? If not, there's probably a lot more experienced people on the ImageJ that might be able to help with your situation. Have you tried asking your question over there?

http://imagej.1557.x6.nabble.com

Karen

On 1/14/2020 9:32 AM, astrofriend [via AstroImageJ] wrote:
Hi, sorry to disturb.

I have some problem with AIJ to run JAVA script. I'm not a JAVA developer but try to do JAVA scripts.

I get an error message when I try to run my script.

It happens already on the first line and I get this in the AIJ log window:
ReferenceError: "importPackage" is not defined in <eval> at line number 1

I have placed the script in the plugin directory.

These are the three first line in my script Input_test.js

importClass(Packages.ij.IJ);
importClass(Packages.ij.io.OpenDialog);
ij = Packages.ij;

It's a Windows10-64 bit computer and everything else with AIJ works, all my macros I have. It's not installed on the C drive. For me it looks like some security problem that Windows block. I have tried to run AIJ as administrator.

Any idea ?

/Lars

Lars
Homepage:
http://astrofriend.eu/



If you reply to this email, your message will be added to the discussion below:
http://astroimagej.1065399.n5.nabble.com/ReferenceError-importPackage-is-not-defined-in-eval-tp1274.html
To start a new topic under AstroImageJ, email [hidden email]
To unsubscribe from AstroImageJ, click here.
NAML