Linux - NewbieThis 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!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i just downloaded the java 2 sdk 1.4.2_04 and installed it. i am trying to install bluej wit the
'java -jar bluej135.jar' command but bash cannont find the 'java' command
from the instructions that i have i have been told to type
'$ vi .bashrc' and then to add 'PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin'
but i have no expirience with vi so i dont know really what to add how to add it where to add it and how to save the changes
there is a reference sometimes commented if bash_profile to bashrc: if so uncomment it.
if no reference is added add you setup to .bash_profile
this would be good too for certains programs looking for java_home
JAVA_HOME=/JAVADIR/
export JAVA_HOME
JAVAWS_HOME=$JAVA_HOME/jre/javaws
export JAVAWS_HOME
i keep on
PATH=$PATH:$JAVA_HOME/bin:$JAVAWS_HOME
export PATH
First off, much as instructing newbies to use 'vi' is a great wheeze, I don't think you want to learn it just for this. You are better off using the graphical editor which come with your gnome/kde desktop. Just look in the menus - it should be obvious.
A good editor when you only have a terminal is 'pico', or the GPL clone 'nano'. One or the other should be on your distro. You would type:
pico -w ~/.bashrc
The -w option turns of line wrapping, which if left on may corrupt system files by splitting long lines.
The quickest way to achieve your stated goal of installing bluej is to leave the .bashrc alone and simply type the full command:
The best way to make this all work reliably is to symlink /usr/java/j2sdk1.4.2_04/ to /usr/local/java, and then link /usr/local/java/bin/java to /usr/bin/java - so the executable will be found in the standard path and if you upgrade the JRE you only need to re-point the symlink.
So your homework is to read up on symlinks, environment variables and the shell $PATH.
If you will take my advice, buy yourself a beginning Linux book. Looking back I have learnt far too much the hard way when I could have had the info right at my fingertips. A quick flick through the Amazon reviews shows there are plenty of great ones to choose from. It'll be worth every penny!
I'm not giving you a tutorial on linking, but the command is 'ln -s'. Type 'man ln' and see if that makes any sense to you.
Oh - and before you get stuck in the manual reader, the command to quit is 'q' :-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.