Re: How to make java client app to download jar package from server
autoly?
Andrew Thompson wrote:
Thomas Kellerer wrote:
Andrew Thompson wrote on 31.12.2006 12:54:
sealo wrote:
....
I want to write a command line java client program.
Why? Or rather, why would you want to use Java to
program a tool intended to be run from within the
command line, as opposed to a program with a GUI?
Why not?
1) I expect most things invoked from the command
line to be 'quicker than the eye can see'. Which is
not the case with any Java application, where the
JVM needs to load, loads some basic classes, load
the appliaction classes, and run.
Presumably a program that needs to download part of itself from a server
is not going to be a "quicker than the eye can see".
My current research project involves a lot of simulations. I do all my
development, including testing, on various Windows XP machines. However,
they are useless when I need to do a hundred runs with different
parameters, some taking hours.
Fortunately, I have access to a Linux grid computer where I can do up to
64 jobs at a time.
A GUI would be a disaster for this type of work - there is no way I'm
going to manually enter the parameters for each simulation individually.
2) Java is not well suited (from what I understand) to
adding those 'little extras' that make CLI based
programs better/bearable. Font colors, 'menus' etc.
It's a very good language to write a cross-platform application be it a GUI or a
commandline app.
I disagree with the latter, unless you are referring
to starting a server (or some other long running
process) from the command line, and also presuming
the application does not need to thereafter gain
input (beyond the very basic) from the end user.
(oh, and of course for those just learning programming,
no need to go rushing into GUI programming until
you've got some understanding of the language)
But then, I did want to push the web-start aspect,
which is another plus for GUI'd desktop apps. ;-)
You did give me the impression that you thought that Java should only be
used for GUI programs. It seems now that you think it should not be used
for two special classes, non-GUI programs that need fancy console
interaction with the user, and quicker-than-the-eye-can-see programs.
Since I would use a GUI if I wanted user interaction with color etc.,
and most of my programs would take long enough to be visible anyway, I
think I'll go on using Java for command line application programming.
Patricia