Discussion Locked

Command line Java

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Tell us what you think about our tip on programming Java from the command line. Have you ever programmed in Java from the command line? Tell us about your experience.

3 replies

by avia

I could be wrong, but if we're talking about using command-line tools as an alternative to GUI tools, then the impression I get is that ANT is the most popular among java developers today.

Showing people how to use UNIX-like scripting is sort of like showing someone a bucycle as a means of transport. Why would I want to work hard pedalling a bicycle, when I can travel much more comfortably in a car?

Of-course, there are always going to be those who prefer a bicycle -- but I think they arein the minority!

by admiralspb

You were actually trying to pedal Ferrari my friend, still thinking it is a bicycle... I am really sorry to hear that Unix scripting is bicycle -- just only because somebody doesn't have any understanding what Unix shells are all about. Shells are not supposed to substitute ant, and vice versa. If you have worked in real production environment, you would have already learned, that there is nothing serios, that can be done with pathetic windows tools. I have 8 years experience in programming, 5 of those under windows. I am SO SORRY I ever came across windows, because it just as far from the development platform as it gets. It is a nice user platform though. I would recommend you trying out vi(emacs)/ant/bash(ksh, csh). There is no good book on that that I can recommend though. No ide can substitute unix shell, you just gotta beleive me and try it out by yourself (takes some time to get there...) . You'll understand it later (if you ever will...). Have a nice day.

by bayard-generationjava

As always the advice is, use the right tool for the job.

Ant is not an all-purposeful scripting language. It's a build tool. Your comment is similar to telling someone to write all their scripts in Make. Something which some C programmers do, butthat is generally frowned upon.

Another problem with your suggestion is that Ant is a Java application, and thus is slow to start and end. Development is all about the speed of feedback, I want to wait the minimal amount of time to get back information requested. I want to balance that with the minimal amount of time to request the information. Therefore scripting beats out writing a GUI, buying a GUI, writing a C program, writing an Ant task.

The people who prefer the sports bicycle which also floats and has wings over the rickety old 1970's car are in the minority :) Thus tips to show nice useful things that can be done.

For the example scripts given, Ant is definitely a replacement for javacdir. Just as Centipede/Maven/CruiseControl etc are larger replacements for Ant.

Javad and missingc [and many others] are doable in Ant, but not what the Ant structure is intended for.

This discussion is closed to new replies.