lakshmi
2012-05-30 15:43:08 UTC
Hi,
I am trying to write plugins for fiji which uses native code. I am new
to this field and so I know very less about this.
In Fiji I went to the path File>New>Script and wrote the
Hello_World.java file:
import fiji.JNI;
import ij.IJ;
import ij.plugin.*;
public class Hello_World implements PlugIn {
static
{
JNI.loadlibrary("Hello_World");
}
native void sayHello();
public void run(String arg)
{
sayHello();
}
}
I stored this .java file in C:\fiji-win32-20110307\Fiji.app\plugins
folder and and then placed the Hello_World.dll file in the path: "C:
\fiji-win32-20110307\Fiji.app" I am getting the error:
Started Hello_World.java at Wed May 30 09:17:56 CDT 2012
C:\fiji-win32-20110307\Fiji.app\plugins\Hello_World.java:12: cannot
find symbol
symbol : method loadlibrary(java.lang.String)
location: class fiji.JNI
JNI.loadlibrary("Hello_World");
^
1 error
..
Alternatively I tried compiling the java file in Eclipse first but I
couldn't proceed as I couldn't import "import fiji.JNI;".. How can I
import this?
Can anyone please give some pointers on where to place the dll file,
abt setting the path and any other required steps?
Thanks,
Lakshmi
I am trying to write plugins for fiji which uses native code. I am new
to this field and so I know very less about this.
In Fiji I went to the path File>New>Script and wrote the
Hello_World.java file:
import fiji.JNI;
import ij.IJ;
import ij.plugin.*;
public class Hello_World implements PlugIn {
static
{
JNI.loadlibrary("Hello_World");
}
native void sayHello();
public void run(String arg)
{
sayHello();
}
}
I stored this .java file in C:\fiji-win32-20110307\Fiji.app\plugins
folder and and then placed the Hello_World.dll file in the path: "C:
\fiji-win32-20110307\Fiji.app" I am getting the error:
Started Hello_World.java at Wed May 30 09:17:56 CDT 2012
C:\fiji-win32-20110307\Fiji.app\plugins\Hello_World.java:12: cannot
find symbol
symbol : method loadlibrary(java.lang.String)
location: class fiji.JNI
JNI.loadlibrary("Hello_World");
^
1 error
..
Alternatively I tried compiling the java file in Eclipse first but I
couldn't proceed as I couldn't import "import fiji.JNI;".. How can I
import this?
Can anyone please give some pointers on where to place the dll file,
abt setting the path and any other required steps?
Thanks,
Lakshmi
--
Please avoid top-posting, and please make sure to reply-to-all!
Mailing list web interface: http://groups.google.com/group/fiji-users
Please avoid top-posting, and please make sure to reply-to-all!
Mailing list web interface: http://groups.google.com/group/fiji-users