how to find jvm.dll at runtime?

I am trying to invoke jvm through .exe file. It is doing so when I specify the path of jvm.dll in the environment variables. I am using win 2000.

Now I want to install this application on different machines which may have different paths to jvm.dll. I need to specify the path to jvm.dll at runtime.

Zeeshan

[334 byte] By [zeeshanarif] at [2007-9-26 6:15:31]
# 1

I'm not sure how you plan to find the jvm.dll on each system, but I'll assume that you can find the path (as a string).

So what you need to do is code your jvm access so that you use explicit - runtime - linking by using LoadLibrary and getProcAddress calls. This allows you to either specify the path in the library load statement, or edit the PATH environment variable (before loading the library).

bschauwe at 2007-7-1 15:09:39 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
Presumably you plan to install the JVM on each machine? I believe the default install sets the path variable to the the appropiate dir. That is all that is needed.
jschell at 2007-7-1 15:09:39 > top of Java-index,Java HotSpot Virtual Machine,Specifications...