Re: New to Linux
From: Jhuola Hoptire (JH_at_nothere.com)
Date: 01/27/04
- Next message: Yoyoma_2: "Re: Programming languages for the very young"
- Previous message: BlackHawke: "Re: Game Company- Java Server Thread Priority"
- In reply to: hiwa: "Re: New to Linux"
- Next in thread: hiwa: "Re: New to Linux"
- Reply: hiwa: "Re: New to Linux"
- Reply: FISH: "Re: New to Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 27 Jan 2004 05:06:00 GMT
hiwa wrote:
> Jhuola Hoptire <JH@nothere.com> wrote in message news:<p3eRb.46425$mU6.175355@newsb.telia.net>...
>
>>Just installed J2RE 1.4.2 on a Linux server. I am very
>>knew to the POSIX world.
>
> 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.
>
>>I couldn't dig-up much in the docs or via google about
>>the following:
>>
>>1 - Is there a standard way to make sure users (all, or
>>some) can "reach" java? eg one could presumably create
>>a java.sh or aliases ... Where is the standard Linux
>>directory to put such a script (and why)?
>>In Win32 this is not an issue as a copy of java.exe is put
>>in a system folder and that folder is in everybody's path
>>(via the global system path) - not an elegant solution,
>>but it works.
>
> Put java.sh on any directory. Then do cd to the directory and
> run command:
>
> ./java.sh
>
> After the install is finished, set PATH and CLASSPATH in the
> .bash_profile file appropriately:
>
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.
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.
>
>>
>>2 - When developing, where should the project resources,
>>(ie java source code, design docs etc...) go on Linux
>>machines? This is not really a java specific question
>>(ie NOT about how to arrange source code in package
>>structure etc... which IMHO is the right way to do it),
>>but more about how to use the Linux file systems,
>>directory structure and file organisation for single
>>user and/or shared development projects.
>
> You decide them all. For example, make learning_java directory
> under your $HOME and do everything in it.
>
Yes, you are absolutely right that java shouldn't mind.
I was looking more for some advice on how the Linux
directories are *conventionally* used, especially in
this type of context.
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.
I was wondering how development files should be organised
relative to Linux core directories to be in the spirit of
"the Linux way".
>
>>3 - Does anyone have links for any resources aimed at
>>experienced java folk who are new to developing/running
>>java on Linux and Unix (coming from Win32 or other)?
>
> No difference Java per se betw Win and Lin. For the system
> environment, amass your own experience. There are many good
> docs and books for Linux out there.
>
Yes, I agree the java should be close to identical. I was
thinking in terms of quirks (or advantages) with the
Linux JVM in terms of performance, synchronisation, memory,
cpu, I/O usage etc ...
>
>>4 - What's the best way to download the latest Linux
>>java distros from Sun if there is no GUI running (and
>>no browser) on your plain Linux server? Sun has stopped
>>offering ftp downloads.
>
> Use GNU wget command, or w3m program. There are many such programs
> on Linux. Do
>
> wget --help
> or,
> man wget
>
>
Have you tried this lately? I looked at lynx, but the problem is
that I couldn't navigate to the right download link.
Cutting and pasting the url at the final step from a graphical
web browser, for example, and using it with wget probably won't
work either due to inconsistencies in session data (I'll try when
I can access my terminal).
Sun seem to be determined to force users through their new, fixed
steps (probably for legal and security reasons), but this makes it
somewhat inconvenient for command-line only users.
Or, am I missing something? I hope so, because I'd like there to
be a satisfactory, well defined way to achieve this.
>>BTW, does anybody have any experience of, or know how
>>the 1.4.2 VM performs on identical Win32 vs Linux PCs?
>
> Linux is faster and stable, less problematic as a server environment
> than Windows. Java GUI implementaion is slightly
> better on Windows than on Linux.
I'm looking forward to finding out.
- Next message: Yoyoma_2: "Re: Programming languages for the very young"
- Previous message: BlackHawke: "Re: Game Company- Java Server Thread Priority"
- In reply to: hiwa: "Re: New to Linux"
- Next in thread: hiwa: "Re: New to Linux"
- Reply: hiwa: "Re: New to Linux"
- Reply: FISH: "Re: New to Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|