Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Finding path to JRE

Reply
Thread Tools

Finding path to JRE

 
 
Murrgon
Guest
Posts: n/a
 
      06-07-2004
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
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      06-07-2004
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
 
Reply With Quote
 
 
 
 
Thomas Kellerer
Guest
Posts: n/a
 
      06-07-2004
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
 
Reply With Quote
 
Murrgon
Guest
Posts: n/a
 
      06-07-2004
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
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      06-07-2004
On Mon, 07 Jun 2004 12:20:30 -0400, Murrgon <(E-Mail Removed)>
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Diff. the JRE INSIDE the jdk folder and JRE OUTSIDE the JDK folder? Jochen Brenzlinger Java 5 09-02-2011 08:48 PM
Is JRE from J2EE not usable to install a java browser plugin? Is separate JRE really necessary? Artur McCennon Java 0 07-22-2009 09:37 AM
Re-engineer application to run in JRE 1.4.2 against old JRE 1.1.7 Prasoon Java 1 04-13-2007 10:20 AM
JRE crash in production ... how to tell JRE is beta? nospawn Java 2 04-25-2006 11:27 AM
Sun giving big hardware prizes for finding JRE 1.6 bugs Mickey Segal Java 5 02-09-2006 07:41 PM



Advertisments