Referencing Java Installation Path from ASP

Discussion in 'ASP General' started by Brad Baker, Apr 15, 2007.

  1. Brad Baker

    Brad Baker Guest

    Our developers are calling a java application from an ASP/ASP.net page.
    Excerpt as follows:

    ----
    Dim a_jvmargs(1)
    a_jvmargs(0)= "-Djava.class.path=C:\Program
    Files\Java\j2re1.4.2_04\lib\rt.jar;" &_
    "C:\jar1.jar;" &_
    "C:\jar2.jar;" &_
    "C:\jar3.jar;" &_
    "C:\jar4.jar"

    set objJVM = Server.CreateObject("comJava.comJavaJvm")

    objJVM.setVMArguments(a_jvmargs)
    objJVM.setJavaVMLibraryPath("C:\Program
    Files\Java\j2re1.4.2_04\bin\client\jvm.dll")
    objJVM.CreateJavaVM()
    ----

    Note the hard coded references to the java installation directory. I.E.
    (C:\program files\Java\jre1.4.2_04)

    Unfortunately hard coding the path to java isn't the most ideal solution for
    various reasons. Primarily upgrading java on our servers without breaking
    our app is problematic. Likewise it requires deploying old versions of java
    to new servers to retain compatibility. (For refernce purposes this code is
    being used by hundreds of websites across dozens of servers)

    So my question is - is there any way to dynamically reference the latest
    java installation directory from ASP vs hard coding it?

    Thanks
    Brad
    Brad Baker, Apr 15, 2007
    #1
    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. moid
    Replies:
    0
    Views:
    320
  2. Steve Flitcroft

    referencing asp controls inside java script

    Steve Flitcroft, Jul 28, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    325
    Rea Peleg
    Jul 28, 2004
  3. Cameron McCormack
    Replies:
    0
    Views:
    365
    Cameron McCormack
    Aug 27, 2007
  4. Arno Broeders

    SSL en certification path installation from asp.net

    Arno Broeders, Jan 2, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    122
    Arno Broeders
    Jan 2, 2004
  5. Arno Broeders
    Replies:
    1
    Views:
    127
Loading...

Share This Page