oh i forgot to mention. That is already done. Let me show where exactly i get the error after i did a trace on the example (DelphiMain)
procedure loadDLL (name: PAnsiChar);
dllClassHandle := LoadLibrary (name);
dllClassHandle := 0;
if dllClassHandle = 0 then
Write (#13#10'error LoadLibrary'#13#10);
dllClass := env^.FindClass(env, name);
if not Assigned (dllClass) then
Write (#13#10'DLL not loaded'#13#10);
Write ('DLL loaded'#13#10);
The error i am getting is "DLL not loaded" and that error is only thrown at one place when a env^.findclass is called in the above piece of code.
The usg file is also not updated when this error is thrown. so there isnt even an issue with the dll.
env^.findClass seems to return a null. I tried it with different JVM's compiled(1.4.1 and 1.4.2 ) still no luck.
the prj file looks like this.
-outputname = dllClass
-UsgFileAutoCompletion = SAFE
am i missing any flag that could make this work with delphi.