[Techtalk] Getting Java running properly on Slackware 10

Glen Strom gstrom at teksavvy.com
Mon Oct 8 06:34:55 UTC 2007


On Mon, 8 Oct 2007 00:43:28 -0500
turtle <dreaded.night.turtle at gmail.com> wrote:


>
>I've tried installing Java on my machine but have been unsuccessful.  I
>asked a friend for help and he tried to install it on my laptop.
>Unfortunately, although he believes it is successfully installed, I'm
>not able to use it.  When I create a .java file, save it to my
>desktop, and try to compile it, the response I get is "javac: command
>not found"  When I asked the friend who said he installed it why it
>was doing this, he said: "It would "automaticly" set it up if i had
>added java to your command path, which, if you remeber, I was perlexed
>about because your distro did not include certain bash files in your
>home directory that would allow me to set the path."
>
You probably don't have the .bash_profile file. Slackware does not
create a .bash_profile or .bashrc file by default.

With your text editor, create a file in your home directory
called .bash_profile (Don't forget the period in front of the name.
Most configuration files start with a period--they're called dot files.)
Open the file and add the following line:

PATH=$PATH:/usr/lib/java/bin

(Note: I'm assuming that your java is installed in /usr/lib/java,
probably as a symlink (soft link) from the actual java install. If it
isn't there, you'll need to adjust the entry to reflect the actual
location.)

Now, save the file. You can reload it by typing the following line in a
terminal:

source .bash_profile


--
Glen Strom
gstrom at teksavvy.com


More information about the Techtalk mailing list