LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-26-2006, 02:26 AM   #1
shabbirhai
LQ Newbie
 
Registered: Jan 2006
Posts: 3

Rep: Reputation: 0
sun java 1.5


Hello sir,
i have installed fedora core 4,and there is in built ibm's eclipse java compiler in it.But i have installed .rpm package of sun's jdk.
when i am using javac command it is compiling through ibm's java.
but i want to run through sun's jdk javac command.how to do it.
please tell me with deatils.

And i want to install the j2ee 1.4 on fc 4.after installing how to set the path and how to run servlets and server pages.
please help me..............thank you
 
Old 02-26-2006, 02:36 AM   #2
dugas
Member
 
Registered: Jul 2004
Location: louisiana
Distribution: fedora 4/kubuntu
Posts: 116

Rep: Reputation: 15
change java in path

change the java in your path. make a symbolic link to the java installation you wish to use.
 
Old 02-26-2006, 12:28 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
There are several ways to go:

1. Uninstall the previous (this is NOT necessary!):
http://www.lykkenborg.no/blog/java/2...0Linux%20HOWTO

2. Use "alternative --configure" to control which (of multiple JDK's) is the default:
https://www.redhat.com/archives/fedo.../msg00231.html

3. Simply set your environment to point to one or the other:
http://www.linuxquestions.org/questi...d.php?t=414008
http://www.linuxquestions.org/questi...d.php?t=167971

Many prefer to do this globally in /etc/profile or $HOME/.bashrc; I think there are advantages in a per-project "env.rc" file. The only "critical" one as $PATH. Other environment variables include
$JAVA_HOME
$JAVA_BIN
$CLASSPATH
etc etc

EXAMPLE LOCAL "ENV.RC":
Quote:
cd MY_PROJECT
vi env.rc
Code:
export PATH=/opt/jdk1.5.0_06/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/cole/bin:.
export JAVA_BINDIR=/opt/jdk1.5.0_06/bin
export JAVA_HOME=/opt/jdk1.5.0_06
export JAVA_ROOT=/opt/jdk1.5.0_06

Last edited by paulsm4; 02-26-2006 at 12:32 PM.
 
  


Reply



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
Blackdown java and offical sun java linuxmandrake Programming 5 12-25-2005 03:14 AM
Sun Java not GCJ untwisted Linux - Software 6 06-16-2005 04:18 PM
Sun Java confidential007 Linux - Software 6 05-30-2004 12:47 PM
Sun Microsystems Java mike35 Linux - Newbie 1 10-13-2003 11:44 PM
sun Java xdan64 Linux - Newbie 3 09-05-2003 07:14 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:45 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration