[GRASS-windows] Call dll from java

Markus Neteler neteler at osgeo.org
Wed Jul 15 15:33:31 EDT 2009


Please consider to use GRASS 6.4 for this since its Windows
portability was significantly improved.

Download here:
http://grass.osgeo.org/grass64/binary/mswindows/

Markus


On Wed, Jul 15, 2009 at 3:50 PM, Lalita Kadam<lalita.k at iworktech.com> wrote:
> I am trying to use and evaluate the Jinvoke . I did all samples . it works
> well . But when I started with your
> Calling C/C++ DLLs from Java example
> Java Code is as follows :
>
>
> import
>
> com.jinvoke.JInvoke;
>
> import com.jinvoke.CallingConvention;
>
> import com.jinvoke.NativeImport;
>
> public class create {
>
> @NativeImport(library="C:\\msys\\1.0\\local\\src\\grass-6.3.0\\vector\\v.dllcreate\\v.dllcreate.dll",convention=CallingConvention.CDECL)
>
> public static native void funcGUIforCSVcreator(int num, String name);
>
> public static void main(String[] args) {
>
> JInvoke.initialize();
>
> funcGUIforCSVcreator(1,
>
> "Dll created for test");
>
> }
>
> }
>
> It got compiled, on running I am getting follwing error :
>
> J/Invoke: LICENSED FOR EVALUATION USE ONLY.
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load
> native library
> C:\msys\1.0\local\src\grass-6.3.0\vector\v.dllcreate\v.dllcreate.dll.
>
> Ensure that
>
> 1) it exists in the java.library.path, or
>
> 2) specify it's full, correct path on the file system, and
>
> 3) ensure that it's dependencies are present in java.library.path
>
> at com.jinvoke.JInvoke.InitMethod(
>
> Native Method)
>
> at com.jinvoke.JInvoke.initialize(
>
> JInvoke.java:146)
>
> at create.main(
>
> create.java:12)
>
>
>
> Can you assist me in rectifying the error
>
> _______________________________________________
> grass-windows mailing list
> grass-windows at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-windows
>
>


More information about the grass-windows mailing list