NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 1133 - IJ is not defined
IJ is not defined
Status: RESOLVED INVALID
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Windows
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2015-08-03 21:29 CDT by Willisa Liou
Modified: 2015-08-04 04:09 CDT
2 users (show)

See Also:

Description Willisa Liou 2015-08-03 21:29:49 CDT
Although I have successfully make the "Always On Top" command appear in the menu under Plugins, When I click on it, the console says that IJ is not defined.

Information about your version of Java:

  os.arch => amd64
  os.name => Windows 7
  os.version => 6.1
  java.version => 1.6.0_24
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_24-b07
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 19.1-b02
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: UP_TO_DATE

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\Users\user\fiji\FIJI-W~1\Fiji.app/java/win64/jdk1.6.0_24//jre
  imagej.dir => C:\Users\user\fiji\FIJI-W~1\Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20150722105527)
Fiji: http://fiji.sc/update/ (last check:20150725035809)

Files not up-to-date:
  fa223c09 (LOCAL_ONLY) 20150804100144 plugins/Always_On_Top.js
  d31ed141 (LOCAL_ONLY) 20150730191459 plugins/Stack_Focuser_.class
Comment 1 Jan Eglinger 2015-08-04 04:09:52 CDT
In Fiji, auto-imports of ImageJ Java classes are disabled (http://fiji.sc/Script_Editor_Auto_Import).

You need to add

    importClass(Packages.ij.IJ);

to the top of your script (see also http://fiji.sc/Scripting_toolbox )

Hope that helps,
Jan