LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-01-2005, 11:09 PM   #1
UmneyDurak
Member
 
Registered: Jun 2004
Posts: 178

Rep: Reputation: 30
Using two versions of Java


Hi.
I'm trying to run two version of java on my machine, v1.3 and v1.5. I modified this method to do it: http://stanton-finley.net/fedora_cor...otes.html#Java
So in java.sh I added another path to 1.5 jdk/bin under JAVA_HOME15.
And run install and config for java, and javac for version 1.5. It seems to be working, but I was wodering if this is a correct way of doing this.
Thx.
 
Old 10-02-2005, 12:32 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
The stanton-finley.net is oriented toward users (emphasis on JRE), you're probably equally interested in development (as am I).

Bottom line: there's no problem in having multiple versions, and what you've done sounds correct.

I'd make things even simpler, however:

1. Have a little "setenv" script in each of your project directories, e.g.
JAVA_PATH="/usr/java/jdk1.5.0_03"

export PATH="$PATH:$JAVA_PATH/bin"
export JAVA_BINDIR="$JAVA_PATH/bin"
export JAVA_ROOT="$JAVA_PATH"
export JAVA_HOME="$JAVA_PATH"
export JRE_HOME="$JAVA_PATH/jre"
export JDK_HOME="$JAVA_PATH"
export SDK_HOME="$JAVA_PATH"

2. "source" it with this syntax:

. ./setenv

3. Voila! Your command line environment is set for this particular version of Java

4. It's worth noting that most IDEs (including both Netbeans and Eclipse)
let you specify one or another JDK's in their respective "project options".

'Hope that helps .. PSM
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can two versions of Java JRE run at the same time? White Spiral Suse/Novell 4 04-24-2005 01:24 PM
different versions of vi? wogga Linux - Software 8 05-31-2004 04:35 PM
4 qt versions? cratos Linux - Software 1 12-14-2003 02:44 PM
Multiple JAVA Versions / DB2 8.1 / SUSE 8.2 byfaithalone Linux - Newbie 1 10-15-2003 02:35 PM
Versions cmenjivar Linux - Newbie 3 08-29-2001 12:00 AM


All times are GMT -5. The time now is 01:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration