LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-06-2005, 08:14 AM   #1
crash_override_me
Member
 
Registered: Aug 2005
Location: India, New Delhi
Distribution: Debian Etch, Ubuntu
Posts: 342

Rep: Reputation: 30
Exclamation jdk 5.0 not working in Ubuntu


HI GUYS,

i installed jdk 5.0 in my home directory, but the compiler & other utilities like javac and java are not working...

i installed it from a .bin(self extracting file).

i also tried installing it in the /usr/local directory, but nothing changed.

Please Help!!
 
Old 09-06-2005, 11:29 PM   #2
ag2uki
Member
 
Registered: Oct 2004
Location: Yogyakarta, Indonesia
Distribution: Mandrake 9.0, 9.1, 9.2, 10.0
Posts: 84

Rep: Reputation: 16
Quote:
i installed jdk 5.0 in my home directory, but the compiler & other utilities like javac and java are not working...
how do you know that's not working!? Is there any error messages?!

It doesn't matter where it was installed. We've just to add <JDK>/bin to environtment variable PATH.
 
Old 09-08-2005, 03:58 AM   #3
crash_override_me
Member
 
Registered: Aug 2005
Location: India, New Delhi
Distribution: Debian Etch, Ubuntu
Posts: 342

Original Poster
Rep: Reputation: 30
Question How do i add to Environment Varialble??

Whenever i type javac or java in the terminal, the error message shown is::
'javac not recongnized as a cpmmand'


How do i add <JDK>/bin to environtment variable PATH.Will it solve the problem??

Please Help!!
 
Old 09-08-2005, 04:38 AM   #4
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Hi there!

I've some tips:

1 - Do not install anything at your home directory. Choose a more appropriated place as /usr/local or /usr/local/share or /opt/. Doing that, Java SDK would be available to every user on your machine, otherwise you will need to install java again for every other user, thus wasting resources.

2 - Java SDK installation instructions is very well documented at Sun's homepage. If you follow it step by step, you will get it to work:

http://java.sun.com/j2se/1.5.0/install-linux.html

3 - Exporting your PATH would work (it's similar to Windows Environment Variables), it's done by adding these lines to your /etc/profile or ~/.bashrc

PATH="$PATH:/usr/local/java/j2sdk<version>/bin"
export PATH


Note: the above line is an example. Use your Java SDK directory instead.

4 - java and javac are both located at the folder where JSDK was decompressed. I believe yours should be something like /usr/local/java/jdk1.5.0/bin/

You could simply create a link for java and javac to your /usr/bin (I do that, instead of using PATH variables). eg:

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

Many would not recommend this method, because a few important tools such as jar and appletviewer are left out (unless you link them too). You can test Java anytime now by typing "java -version" at the terminal.

Good luck!

Last edited by Mega Man X; 09-27-2005 at 04:35 PM.
 
Old 09-08-2005, 09:55 AM   #5
crash_override_me
Member
 
Registered: Aug 2005
Location: India, New Delhi
Distribution: Debian Etch, Ubuntu
Posts: 342

Original Poster
Rep: Reputation: 30
Thumbs up Thanx Megaman X

thanx dude,

the problem is solved!!
 
Old 09-08-2005, 12:13 PM   #6
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
I'm glad I could help . Oh and thanks for your reply too. I wish more new members were like you and replied either telling if what was suggested worked or not, so the thread can be used by other members as well.

Best Regards!
 
  


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
linksys + Ubuntu...not working out warrenr27 Ubuntu 1 10-25-2005 07:29 PM
jdk not working crash_override_me Ubuntu 3 10-18-2005 12:35 PM
Audio in Ubuntu not working ummyeah Linux - Newbie 4 06-23-2005 06:05 PM
My USB isn't working in Ubuntu... SonoranFun Linux - Hardware 1 12-03-2004 06:48 AM
jdk 1.3.1_06 not working in mandrake 9.2 zho40 Linux - Software 4 12-15-2003 12:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 01:46 PM.

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