I am calling a java function in Delphi 7 using JNI. When start button click the java application loads and when stop button clicks the java application exits. But my problem is that when I click stop button, the java application and the delphi application exits. I need to exit the java application only and not the delphi application.
var
exit_code: Integer;
Runtime : TJavaRuntime;
begin
exit_code := 0;
Runtime.CallExit(exit_code);
end
java.lang.System.exit()is terminating the process too.