Using multiple java versions in unix


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Using multiple java versions in unix
# 1  
Old 09-01-2005
Using multiple java versions in unix

Hello
we are using java 1.2 in our shell / env
it is also set in the main JAVA_HOME env var ,
but we have also java 1.4 installed , now we need to use new application that uses only java1.4
is there any way to point this specific application to use java 1.4 without changing the global JAVA_HOME env var ?
thanks
# 2  
Old 09-01-2005
You can change the JAVA_HOME to point to the JAVA1.4 everytime you run your new application.
Yes, it will override the existing JAVA_HOME only for that particular shell(tty). Else JAVA_HOME will point to JAVA1.2

Another way is to put JAVA_HOME in a configuration file, if the application reads from configuration files.

vino
# 3  
Old 09-05-2005
If I understand it corectly you are using a global JAVA_HOME environment variable. You could override this in the .profile file of the user account under which the application is running, or create a special user account for this application.

export JAVA_HOME=/path/to/java/bin

This way other applications aren't affected by it.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How does extundelete handle multiple versions of the same inode?

Hi, I noticed a weird behavior in extundelete way to choose the filename to which it will restore a given inode. Here is an example : root@rescue:~# for after in '' 0 740 741 $(date -d 'now - 1 year' +%s); do rm -rf RECOVERED_FILES/; echo -e "$(date -d@$after 2> /dev/null || echo No... (4 Replies)
Discussion started by: chebarbudo
4 Replies

2. Red Hat

Installing multiple versions of same package.

I need to install a older version of gnupg but not delete the current version of gnup2 on RHEL 6.4. What would be the correct syntax to install this? Tried to install and relocate it and still getting conflicts. aXXXXXX:root# rpm -ivh /root/rpmbuild/RPMS/x86_64/gnupg-1.4.16-1.x86_64.rpm... (2 Replies)
Discussion started by: soupbone38
2 Replies

3. UNIX for Dummies Questions & Answers

Patches - why multiple versions?

Hi just wondering really ...... I've done a showrev -p and am somewhat surprised to see apparently multiple different versions of the same patches ...... 112161-02 112161-03 112161-04 It's my understanding that a newer revision of a patch , -04 in this case supercedes all previous... (2 Replies)
Discussion started by: Martincorneuk
2 Replies

4. UNIX and Linux Applications

install multiple versions of firefox in linux

Since apt-get and yum won't let you install multiple versions of firefox I will explain how to here. 1. Go to this page and decide which version of firefox you want. ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/ I used this one. ... (0 Replies)
Discussion started by: cokedude
0 Replies

5. Linux

Compiling with multiple versions of a library

Hello! I have a set of headers and libraries I want to use but they are mixed with ones I do not want to use. They are part of some official stuff, so I cannot modify them while begging and pleading for weeks. These headers and libraries are located here /long/official/path/to/include... (0 Replies)
Discussion started by: gobi
0 Replies

6. UNIX for Advanced & Expert Users

How to execute multiple unix commands in one session from java

Hi, Iam trying to code in java and wanted to run the commands in the Unix remote servers. I have the following code to run multiple GREP commands in a single session. But when i execute this, the first command executes successfully, whereas from the next line it says "Exception Occured... (1 Reply)
Discussion started by: gravi2020
1 Replies

7. UNIX for Dummies Questions & Answers

how to install new java versions to 264 version4.0 alpha

I wrote a java code and compiled it using j2sdk 1.4.2 version. But i have to port those to a unix machine in which a very old version of unix has installed. say unix 264 version4.0 alpha. And the default java version that comes with that unix version is also very old and it is java version... (0 Replies)
Discussion started by: rasa_still_here
0 Replies

8. Shell Programming and Scripting

How to manage multiple versions of a set of shell and SQL script utilities

Hi all --- I have the need to manage multiple versions of a set of utility scripts -- both shell and SQL and other .dat files. I am wondering if anyone out there knows of a good way to "PATH" to SQL and text files in a way similar to how PATH facilitates finding executables in a pre-specified... (2 Replies)
Discussion started by: DennisB
2 Replies

9. UNIX Desktop Questions & Answers

Need to know all versions of Unix

:confused: What are some of the most popular versions of Unix and why? (2 Replies)
Discussion started by: jpawlicki2
2 Replies

10. UNIX for Dummies Questions & Answers

What different versions of UNIX are there?

Aside from the normal Linux distros, OS X, and the BSDs, what other forms of UNIX are there? I want to try one on a very old 75mhz box I have. Thanks in advance. (3 Replies)
Discussion started by: AMDPwred
3 Replies
Login or Register to Ask a Question