Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-12-2004, 04:56 PM   #1
LQ Newbie
Registered: Dec 2003
Distribution: womandrake
Posts: 28

Rep: Reputation: 15
i got 2 java compilers

i have mandrake 8.1

the problem is that i have 2 javac and java

if i type java in consle, it calls this stupid java vm. I don't want that

i ALSO have the REAL javasdk(from sun) installed at

i want my box to execute the REAL java and javac when i type java or javac..(one of the reason i wanna do this is that drjava wno't run if i use the default java .
for example, if i type(drjava is in the same dir )

java drjava.jar
this gives me some error. drjava wo'nt run

but if type
cd /usr/java/j2sdk1.4.2_03/bin
./java -jar drjava.jar
then it will work fine

ok.. let's simply the problem here. the problem i have is
java and ./java run 2 different program..
i want ./java to be the default

how do i fix it?

thanks in advance..
Old 01-12-2004, 05:01 PM   #2
Registered: Oct 2002
Location: Michigan
Distribution: Slackware Linux 10.0
Posts: 289

Rep: Reputation: 30
Set "/usr/java/j2sdk1.4.2_03/bin" to your $PATH. This may be in your .*rc file. It all depends on what shell you are using. So if you are using bash, you could put:

export PATH=$PATH:/etc your .bashrc file.
Old 01-12-2004, 06:11 PM   #3
LQ Newbie
Registered: Dec 2003
Location: Australia
Distribution: Mandrake 10
Posts: 18

Rep: Reputation: 0
Add /usr/java/j2sdk1.4.2_03/bin to the beginning of your path.
# export PATH=/usr/java/j2sdk1.4.2_03/bin:$PATH
This way, when you type java you shell will look in /usr/java/j2sdk1.4.2_03/bin for it before it looks anywhere else. You'll probably want to add it to your ~/.bashrc so you don't have to type it in every time.
Old 01-12-2004, 09:30 PM   #4
LQ Newbie
Registered: Dec 2003
Distribution: womandrake
Posts: 28

Original Poster
Rep: Reputation: 15
thanks guys!!! appreciate it!!


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
Compilers lramos85 Programming 4 10-03-2004 01:50 PM
How to use various compilers thru JAVA nedian123 Programming 1 07-04-2004 05:00 AM
C++ Compilers (!~CoW~!) Linux - Software 12 11-18-2003 09:52 AM
Compilers... ChaosZ3RO Linux - Software 1 09-15-2003 06:08 PM
CD with many compilers...Are there any? Colonel Panic Programming 5 10-16-2001 07:16 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:52 AM.

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