Menu

#2 Command line args for file

Next_Release
open
nobody
5
2003-05-17
2003-03-26
KosherJava
No

Hi,
I find jcola useful but would like command line args.
The args should be a file path.
so I can do the following:
>java -jar d:\stuff\jcola_01_beta.jar c:\logs\myLog.log

and have it open tailing the log passed in as an
argument.
One reason that this would be useful is the ability to
script it and possibly have it added to Windows "Send
To" menu.

Discussion

  • KosherJava

    KosherJava - 2003-03-26

    JColaMain modified for command line file name arg

     
  • KosherJava

    KosherJava - 2003-03-26

    Logged In: YES
    user_id=634811

    Here is the JColaFrame

     
  • KosherJava

    KosherJava - 2003-03-26

    JColaFrame modified for command line file name arg

     
  • KosherJava

    KosherJava - 2003-03-26

    Batch file to run with arg.

     
  • KosherJava

    KosherJava - 2003-03-26

    Logged In: YES
    user_id=634811

    modify the bat to point to your jar and create a shortcut to the
    bat file in your send to folder in windows.
    Enjoy

     
  • KosherJava

    KosherJava - 2003-03-31

    Logged In: YES
    user_id=634811

    Hi,
    Just a tip on expanding the idea.
    to allow selecting and tailing multiple files at once change the
    src to loop through the args accepting multiple args all as
    files and the passing on a File[] from the main. If there was
    only 1 arg test to see if it is a directory. If it is loop through all
    files in the dir and pass the File[] of all files to the GUI.
    the bat would have to be modified as follows:
    start javaw -jar "C:\Program Files\jcola\jcola_011_beta.jar" %*
    Due to the fact that my log file is growing at up to 1/2 MB a
    second I had to move to a native tail solution. Swing can't
    keep up and was slowing down my system. But
    implementing this suggestion should be trivial

     
  • Roy Russo

    Roy Russo - 2003-05-17
    • milestone: --> Next_Release
     

Log in to post a comment.