> jvm.dll is copied from jdk1.3.1_19\jre\bin\classic\ to working path,
You may have other problems, but that will cause JNI_CreateJavaVM() to fail all
by itself. You have to ensure that your outer program is loading the JVM.DLL
from the right place, not move the DLL.
I prefer to use an explicit call to the Win32 LoadLibrary() function myself
(I've posted example code here before -- Google should find it). Or you could
set the %Path% to include the directory containing the JVM.DLL -- that may
sound easier but is probably more messing around in the long run.
-- chris
dzikus_@vp.pl - 06 Nov 2006 13:15 GMT
I thing proper jvm.dll is loaded , becouse:
1) I see it indebugger information about loaded dll's:
... Loaded 'C:\dschaefer\workspace\jni\jvm.dll', No symbols loaded
...
2) when I delete dll from project directory program does not run
anymore.
Has anybody any other ideas?
Regards
Dominik
> > jvm.dll is copied from jdk1.3.1_19\jre\bin\classic\ to working path,
>
[quoted text clipped - 8 lines]
>
> -- chris
Gordon Beaton - 06 Nov 2006 13:37 GMT
> I thing proper jvm.dll is loaded , becouse:
> 1) I see it indebugger information about loaded dll's:
[quoted text clipped - 4 lines]
>
> Has anybody any other ideas?
Yes. Listen to the advice you've been given. Do not move the jvm.dll
from the rest of the JVM. It is dependent on other files there.
/gordon

Signature
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
dzikus_@vp.pl - 06 Nov 2006 14:21 GMT
> Do not move the jvm.dll from the rest of the JVM. It is dependent on other files there.
This was the cause of my problem.
I have added to the PATH environment variable path
c:\Java\jdk1.3.1_19\jre\bin\classic\
and now CreateJavaVM is working OK :)
Thanks a lot for help
Best regards
Dominik