473,395 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Referencing Java Installation Path from ASP

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
Apr 15 '07 #1
0 1547

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Laura P | last post by:
Hi, I wasn't sure whether this should be posted in the Java are or in a Solaris thread, so I shall post it in both. Sorry for the duplication. I am new to Solaris and am having trouble...
21
by: BlackHawke | last post by:
My name is Nick Soutter, I own a small game development company (www.aepoxgames.net) making our first game (www.andromedaonline.net) in java. I am writing because we are having a very...
9
by: vegetax | last post by:
I was a java developer one year ago ,before i moved to python i realy liked it at the beggining, but i got very disapointed lately since my previus two python proyects where relatively big,and...
1
by: Hai-Chu Hsu | last post by:
Hi, I want to restore my databases from the old SQL Server installation into a new installation of SQL Server. My new installation of SQL Server has different data path from the old...
4
by: acemann7 | last post by:
Windows 2000 udb v 7.2 Got the latest fixpak 13 Applied it. Still can't get a single java sp to run. I used to get reason "2"... now reason "0" - reason 0 is not even documented. I point...
4
by: Christos Kalantzis | last post by:
Hello, I am trying to get JAVA UDFs working in DB2 8.2.2. I created a class, then I compiled it using with the IBM JDK included with DB2. I put the class in the sqllib folder and created a...
6
by: Mikey_Doc | last post by:
Hi We are running cms 2002, Framework 1.0 with Visual studio 2002. We have just upgraded to Framework 1.1 and visual studio 2003. All of our database connection strings are stored within the...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
1
by: stmfc | last post by:
although i installed java_ee_sdk-5_03-windows.exe into C:\Sun\SDK withouth any problem. i get the following error: C:\Documents and Settings\st>java -version 'java' is not recognized as an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.