LinuxQuestions.org
Review your favorite Linux distribution.
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 05-26-2008, 10:00 AM   #1
nexl
LQ Newbie
 
Registered: May 2008
Posts: 1

Rep: Reputation: 0
Java path problems in Ubuntu 7.04


Hi All,
I installed JDK1.5_15 on my Ubuntu 7.04.When Iam executing "java -version"
the old gcj version 1.4.2 is reported .I added the path in .bashrc
When I executed the "which java" command its searching in /usr/bin/java.

Iam new to java and Linux.Can any one tell me where I went wrong.


Thanks in Advance.

Nex
 
Old 05-26-2008, 11:33 AM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Right I recommend removing that POS (Piece of Sh*t) called GCJ? I only keep it around for some basic Java-to-native-binary compiling, but for the most part, GCJ just confuses Java programmers to no end due to the fact that if you've never programmed and compiled C or C++ programs in Linux (or UNIX), half of the necessary flags you need to pass to the compiler make no sense.

Simply, uninstall GCJ and cross your fingers in hoping it's not tied into the GCC package (which, I don't believe it is).
 
Old 05-26-2008, 11:43 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
It is easier to do the install with 'sudo apt-get install sun-java5-jre'
(or use synaptic)
Then all links to 'gcj-4.2' will change. So when typing 'java -version'
in a terminal, the answer should be:
"java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05)
Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode, sharing)"

Rgds
Edit: Sorry, indienick, I didn't see your answer while typing the above lines.
P.S.: Synaptic : Removing 'gcj-4.2' will install 'sun-java6-jre'

Last edited by knudfl; 05-26-2008 at 12:00 PM. Reason: PS
 
Old 05-26-2008, 02:21 PM   #4
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
It's all good, knudfl.
 
  


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
Ubuntu 7.10 64bit - how to set java path to/redirect java to libjvm.so ? Thane Ubuntu 1 03-25-2008 05:52 PM
installing java on ubuntu+ problems with beryl myzery Linux - Newbie 0 09-18-2007 04:47 PM
export Path=/usr/java:$Path does not seem to work lumix Linux - Newbie 1 03-19-2007 03:11 PM
Having problems with web sites/flash/(?)java(?) on Mac Ubuntu 5.04. RHLinuxGUY Ubuntu 8 02-06-2006 03:18 PM
problems setting up PATH in ubuntu lemuel Linux - General 7 01-14-2005 11:51 PM


All times are GMT -5. The time now is 08:21 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