Re: How to make java client app to download jar package from server autoly?



Andrew Thompson wrote on 31.12.2006 14:24:
[...]
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.

What makes a Java app slow to start is (in most of the cases) the Swing classes that are loaded. A pure CLI is not that slow nowadays. On my machine I can't really detect a huge "starting phase" for e.g. a Hello World program (especially not with Java6). Of course it depends on what the program is doing.

C:\>date +%s
1167572635

C:\>java Hello
Hello, world

C:\>date.exe +%s
1167572636

(date is a small unix utility that can output the current seconds since 00:00:00, Jan 1, 1970)

As you can see running Hello.java only took one second, which I consider acceptable for a CLI program.

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.

Agreed, although my understanding of a CLI is, that you invoke the program, it carries out it's tasks and then ends. When menus come into play, I'd call it a text-mode-GUI. But then that is probably personal "taste" ;)

Thomas



.



Relevant Pages