Setting PATH system variable
I have installed the Sun Java SDK in usr/local/
How can I do this?
Thanks...
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Last query:
- 2006-10-01
- Last reply:
- 2006-10-02
| Kurt von Finck (mneptok) said : | #1 |
Put this in .bashrc or whatever file(s) your shell uses for environment variables:
PATH=${
export PATH
This will append your PATH to include Java, so do not overwrite prior PATH statements with this.
This doesn't directly answer your question, but FYI that Java and the JDK are in the Ubuntu repositories already. Just do:
sudo apt-get install sun-java5-jdk sun-java5-jre sun-java5-plugin
Now run:
sudo update-alternatives --config java
And make sure you're using Sun's java. That'll handle all the path-setting for every user and makes it much easier to manage updates, etc. You'll have to enable the `multiverse' repository, I believe.
Hope that helps.
| javarunner (randomnoise) said : | #3 |
Thanks for responding. The magic of sudo!
I'm just starting to get into Linux and have tried several distros.
I've used Windows since MS released version 1. Since I use so much
open-source in my work, I thought I'd give Linux a try as a dev
environment. Looked at several distros, Mandriva, xandros but finally
settled on Ubuntu. I have it as the only OS on this desktop, and have
it in a dual-boot setup on my laptop (with Win XP Pro). I'm trying to
transfer all development to Ubuntu - write-once, run-anywhere. I'll let
you know how it goes. I work with Java/JBoss/
On Sun, 2006-10-01 at 06:22 +0000, Eamonn Sullivan wrote:
> Support request #1931 on Ubuntu changed:
> https:/
>
> Comment:
> This doesn't directly answer your question, but FYI that Java and the JDK are in the Ubuntu repositories already. Just do:
>
> sudo apt-get install sun-java5-jdk sun-java5-jre sun-java5-plugin
>
> Now run:
>
> sudo update-alternatives --config java
>
> And make sure you're using Sun's java. That'll handle all the path-setting for every user and makes it much easier to manage updates, etc. You'll have to enable the `multiverse' repository, I believe.
>
> Hope that helps.
thanks for the reply. If this problem is solved, consider changing the status to "answered."
Can you help with this problem?
Provide an answer of your own, or ask javarunner for more information if necessary.

