Re: New to Linux
From: FISH (joeking_at_merseymail.com)
Date: 01/27/04
- Next message: Dave Rathnow: "Anyone using J2ME in non-commercial applications?"
- Previous message: hiwa: "Re: New to Linux"
- In reply to: Jhuola Hoptire: "Re: New to Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Jan 2004 02:59:30 -0800
Jhuola Hoptire <JH@nothere.com> wrote in message news:<YkmRb.80105$dP1.203357@newsc.telia.net>...
> hiwa wrote:
>
> > Jhuola Hoptire <JH@nothere.com> wrote in message news:<p3eRb.46425$mU6.175355@newsb.telia.net>...
[snipped...]
> > Install J2SE, not J2RE which is a runtime for exising Java
> > applications.
> >
> I'm going to install both. The jre should be
> redundant but I am experimenting with the different
> downloads and installation processes (rpm vs zipped tar).
> Right now, it's more about learning my way around Linux.
You should only need to install the SDK. The SDK is the JRE with
extra compiler/debug tools etc.
[snipped...]
> That's what I was looking for, thanks. In fact I had used
> /etc/profile for this. The comments in that script seem to
> imply it sets the system wide environment, which is probably
> best for my current purposes.
> > export JAVA_HOME=your-installed-directory
> > export PATH=$PATH:$JAVA_HOME/bin
> > export CLASSPATH=$CLASSPATH:.
> > # .(dot) is current directory
> >
> Why add the '.'? Unless there is some compelling reason
> (like the Linux installation requires it), IMHO, there is
> no other valid argument for users (probably as developers,
> in this case) expecting their "present working directory"
> (pwd) to be on the CLASSPATH.
If you don't put the PWD in your classpath, then you'll have to
explicitly set the classpath before running any non-Jar'd code.
This can become quite tedious.
You may, however, wish to defer this to a user's .profile (or
similar) script, so it can be tailored to suit individual taste
(although I think you'll find that almost all Java coders will
add it, because it makes like that bit easier.)
> At best it could cause confusion, especially for beginners
> who quite often put all their source code in one folder
> (their pwd) and don't always make proper use of
> "package"ing.
On the contrary, beginners are often confused by the inability to
type "java MyClass" and have it run, when they see MyClass.class
in the current directory. Or indeed "java mypackage.MyClass"
when they see a file ./mypackage/MyClass.class off of their
current directory.
[snipped...]
> An example of the conventions for "correct" usage of Linux
> directories; after I installed java, I read that /usr/ is
> only supposed to be for apps added during the Linux
> installation. However, Sun have decided to stick
> the java installation there too.
Probably because originally it wasn't installed as standard with
the OS - so historically this is where it has always lived (?)
-FISH- ><>
- Next message: Dave Rathnow: "Anyone using J2ME in non-commercial applications?"
- Previous message: hiwa: "Re: New to Linux"
- In reply to: Jhuola Hoptire: "Re: New to Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|