Re: [SLUG] Need help with .bin files!

From: Brad Smith (brad_stephenssmith@yahoo.com)
Date: Tue May 27 2003 - 20:33:48 EDT


> In your /bin directory type in
>
> ln -s /usr/lib/j2re1.4.1_02/bin/java java (or whatever your path to
> java is) this goes for the next step to.

An alternative, if I may: while I can't think of any reason not to do the above (unless you are
writing java code which, come to think of it, it sounds like you are doing) java apps generally
look for the java program in the directory pointed to by your JAVA_HOME environment variable. This
is also where, for example, studio1 will expect to find the java compiler and where anything else
looking for something related to java will check.

So my suggestion is to add the line: 'export JAVA_HOME=/usr/lib/j2rewhatever' to /etc/profile.
That will cause the var to always be set. If you do java development or for any reason find
yourself needing to alternate between java editions/versions, what I do is this: I create a
symlink /usr/java called 'home', which points to whatever version I'm using at the moment and set
JAVA_HOME to equal '/usr/java/home' in /etc/profile. That way, switching is just a matter of
removing and re-creating the symlink. No more mucking about with /etc/profile.

Also, be advised that if you do this, it wont' take affect until the next time you log in and
opening up a new xterm doesn't count. Relogin to X or, if you just want to make sure it worked, do
'su - yourusername' in an xterm. That will also start a new login session, but only in that window
(ie it won't affect any other xterms new or old).

--Brad



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:21:55 EDT