LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-03-2004, 02:13 PM   #1
Patbuzz86
Member
 
Registered: Mar 2004
Distribution: MDK 9.2
Posts: 92

Rep: Reputation: 15
pointing bash


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

can some one please help
 
Old 04-03-2004, 02:44 PM   #2
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
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
 
Old 04-03-2004, 03:21 PM   #3
avarus
Member
 
Registered: Apr 2004
Location: Oxford, UK
Distribution: Ubuntu, Debian, various
Posts: 230
Blog Entries: 5

Rep: Reputation: 33
Will do my best to help.

Hi,

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:

/usr/java/j2sdk1.4.2_04/bin/java -jar bluej135.jar

(Assuming that that path is indeed correct).

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.

HTH

Tim
 
Old 04-03-2004, 04:21 PM   #4
Patbuzz86
Member
 
Registered: Mar 2004
Distribution: MDK 9.2
Posts: 92

Original Poster
Rep: Reputation: 15
wow that was cool -- directly linking worked Thanks so much

now all i need to do is to
symlink
/usr/java/j2sdk1.4.2_04/ to /usr/local/java
and
/usr/local/java/bin/java to /usr/bin/java

and i have no idea how to do that!
help?
 
Old 04-03-2004, 04:38 PM   #5
avarus
Member
 
Registered: Apr 2004
Location: Oxford, UK
Distribution: Ubuntu, Debian, various
Posts: 230
Blog Entries: 5

Rep: Reputation: 33
Glad I could be of assistance!

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' :-)

TIM
 
  


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
Can I initialize pointing device AFTER X is running? KimVette Linux - Hardware 4 03-07-2005 07:20 PM
need pointing to a good tutorial salparadise Linux - Networking 1 04-19-2004 11:30 AM
i solved the pointing thingy Longinus Programming 5 02-28-2004 03:20 AM
directory pointing to another albean Linux - Newbie 1 10-04-2002 10:33 AM
pointing browser to localhost??? asiatrek Linux - Networking 2 05-22-2002 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:38 AM.

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