Visit Jeremy's Blog.
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 03-29-2006, 12:31 PM   #1
LQ Newbie
Registered: Feb 2006
Posts: 3

Rep: Reputation: 0
gcj javac instead of jdk javac

javac is referring to gcj's javac instead of jdk's javac.
how do i switch it so that javac refers to jdk's javac?
Old 03-29-2006, 06:50 PM   #2
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
I'm not sure of your relative skill level, so I'm just going to explain what I'd do, if you need step by step instructions let me know though.
First I'd figure out what my JAVA_HOME environment variable is, and which javac binary is being used. Then I'd backup whatever javac binary is being pointed too, and link to the gcj javac instead. You might have to fool around with JAVA_HOME, but ideally you could just run the gcj javac and be good to go.
As I said, ask for specifics if you need.
Old 03-29-2006, 08:18 PM   #3
LQ Newbie
Registered: Feb 2006
Posts: 3

Original Poster
Rep: Reputation: 0
problem solved.

actually, i wanted to switch from the gnu java compiler to sun's java compiler. JAVA_HOME was pointing to the right directory. thanks for the suggestion though.

i ended up using the commands "which javac" and "whereis javac" to find that the symbolic link was in /usr/bin. so then i removed the link:

rm /usr/bin/javac

and created a new one pointing to the one i wanted to use:

ln -s /usr/local/jdk1.5.0_06/bin/javac /usr/bin/javac


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
Eclipse and gcj as JDK foucault Linux - Software 0 10-23-2005 11:56 AM
javac zaicheke Programming 2 10-05-2004 10:46 PM
javac troubleshouting bullshit Linux - Newbie 1 10-03-2004 04:19 AM
javac linuxRules Linux - General 3 05-23-2002 07:45 AM
javac linuxRules Linux - General 0 05-21-2002 09:15 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:03 PM.

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