Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Referencing Java Installation Path from ASP

Reply
Thread Tools

Referencing Java Installation Path from ASP

 
 
Brad Baker
Guest
Posts: n/a
 
      04-15-2007
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


 
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
Referencing jar file in ${java.home}/lib from manifest Class-Path entry Cameron McCormack Java 0 08-27-2007 01:17 AM
Various path/path/files.asp all #include this 1 file \A_Michigan_User\ ASP General 1 07-10-2005 01:55 PM
referencing asp controls inside java script Steve Flitcroft ASP .Net 1 07-28-2004 09:10 AM
repost managed group: SSL and certification path installation from asp.net Arno Broeders ASP .Net Security 1 01-07-2004 02:35 AM
SSL en certification path installation from asp.net Arno Broeders ASP .Net Security 0 01-02-2004 01:15 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57