[GRASS-windows] call grass dll form java
Lalita Kadam
lalita.k at iworktech.com
Mon Jul 20 02:36:55 EDT 2009
I am trying to call dll of grass form java using Eclipse
Following is code of java:
*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*)
//System.load("C:\\*msys*\\1.0\\local\\*src*\\grass-6.3.0\\vector\\v.*
dllcreate*\\v.*dllcreate*.*dll*");
//System.out.*println*("loaded")
//System.loadLibrary("C:\\*msys*\\1.0\\local\\*src*\\grass-6.3.0\\vector\\v.
*dllcreate*\\v.*dllcreate*.*dll*");
*public* *static* *native* *void* funcGUIforCSVcreator(*int* num, String
name);
*public* *static* *void* main(String[] args) {
JInvoke.*initialize*();
System.*out*.println("Intialize completed");
*funcGUIforCSVcreator*(1,"Dll created for test");
System.*out*.println("Dll call");
}
}
Following is the error when we run java code as java application:
An unexpected error has been detected by HotSpot Virtual Machine:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77c478c0, pid=7592,
tid=9384
# Java VM: Java HotSpot(TM) Client VM (1.5.0_13-b05 mixed mode, sharing)
# Problematic frame:
# C [MSVCRT.dll+0x378c0]
# An error report file with more information is saved as hs_err_pid7592.log
Assist me to rectify this error
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-windows/attachments/20090720/f41dccf1/attachment.html
More information about the grass-windows
mailing list