Finding path to JRE

Discussion in 'Java' started by Murrgon, Jun 7, 2004.

  1. Murrgon

    Murrgon Guest

    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
    Murrgon, Jun 7, 2004
    #1
    1. Advertising

  2. 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.classpath>
    ...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
    Andrew Thompson, Jun 7, 2004
    #2
    1. Advertising

  3. 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
    Thomas Kellerer, Jun 7, 2004
    #3
  4. Murrgon

    Murrgon Guest

    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
    Murrgon, Jun 7, 2004
    #4
  5. Murrgon

    Roedy Green Guest

    On Mon, 07 Jun 2004 12:20:30 -0400, Murrgon <>
    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.
    Roedy Green, Jun 7, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mickey Segal
    Replies:
    5
    Views:
    650
    Larry Barowski
    Feb 9, 2006
  2. nospawn
    Replies:
    2
    Views:
    514
    Real Gagnon
    Apr 25, 2006
  3. Prasoon
    Replies:
    1
    Views:
    467
    Andrew Thompson
    Apr 13, 2007
  4. Artur McCennon
    Replies:
    0
    Views:
    399
    Artur McCennon
    Jul 22, 2009
  5. Jochen Brenzlinger
    Replies:
    5
    Views:
    922
    Roedy Green
    Sep 2, 2011
Loading...

Share This Page