Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Finding path to JRE (http://www.velocityreviews.com/forums/t134167-finding-path-to-jre.html)

Murrgon 06-07-2004 04:20 PM

Finding path to JRE
 
Is there some official way to find the location of the OS's
JRE? I am running a win2k system and I want to start up the
JVM using JNI_CreateJavaVM(). However, to be able to
GetProcAddress() this function I first need to be able to
find the jvm.dll and LoadLibrary() it.

Thanks
Murrgon

Andrew Thompson 06-07-2004 04:43 PM

Re: Finding path to JRE
 
On Mon, 07 Jun 2004 12:20:30 -0400, Murrgon wrote:

> Is there some official way to find the location of the OS's
> JRE?


you might try..
<http://www.physci.org/pc/properties.jsp?prop=java.home+sun.boot.library.cla sspath>
...in the downloadable *application* of course
(it is an unsigned applet therefore cannot
access those protperties)

HTH

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology

Thomas Kellerer 06-07-2004 06:15 PM

Re: Finding path to JRE
 
Murrgon schrieb:
> Is there some official way to find the location of the OS's
> JRE? I am running a win2k system and I want to start up the
> JVM using JNI_CreateJavaVM(). However, to be able to
> GetProcAddress() this function I first need to be able to
> find the jvm.dll and LoadLibrary() it.
>
> Thanks
> Murrgon


The source ZIP for the JDK contains the C code for the Java launcher as
well. You might want to have a look at the code to find out how it finds
the JDK/JRE. I guess this would be the "most official" way :)

Thomas

Murrgon 06-07-2004 08:10 PM

Re: Finding path to JRE
 
Thomas Kellerer wrote:
> The source ZIP for the JDK contains the C code for the Java launcher as
> well. You might want to have a look at the code to find out how it finds
> the JDK/JRE. I guess this would be the "most official" way :)


Good suggestion. I took a look at the code and they're just reading the
details from the registry. I am assuming that each platform that is
supported has their own method for retreiving this info.

Murrgon

Roedy Green 06-07-2004 08:49 PM

Re: Finding path to JRE
 
On Mon, 07 Jun 2004 12:20:30 -0400, Murrgon <murrgon@hotmail.com>
wrote or quoted :

>Is there some official way to find the location of the OS's
>JRE? I am running a win2k system and I want to start up the
>JVM using JNI_CreateJavaVM(). However, to be able to
>GetProcAddress() this function I first need to be able to
>find the jvm.dll and LoadLibrary() it.


If you use Java Web Start they find it for you. You just give you
list of preferences.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


All times are GMT. The time now is 02:52 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.