Referencing Java Installation Path from ASP

B

Brad Baker

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top