Search:

Type: Posts; User: JavaPF

Search: Search took 0.13 seconds.

  1. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    Can you post your updated code for us to look at then please...
  2. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    Hey Truffy.

    In the TruffyLog class, try changing:



    public static boolean isOn() {
    return on;
    }
    to
  3. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    Trail: RMI (The Java™ Tutorials)

    Are you looking to make the program print out only the changes in the file? You are still going to need to download and parse the entire log file atleast once....
  4. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    No problem Truffy. I'm glad I can help.
  5. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    I don't have any SSH code examples. I suggest you look for a Java SSH API.

    SourceForge.net: SSHTools

    SourceForge.net: SSHTools: Files
  6. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    Try this. I have used a boolean variable which is set to false at run time. When the log file is changed for the first time, the createAndShowGUI method is run and the boolean variable is set to...
  7. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    I haven't tested that code on large files but as far as im aware, it will download them as fast as your internet connection will allow. I'm not sure how you would make the process faster.
  8. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    Good morning Truffy,

    I'm glad that code is working with the new server.



    So you want to watch the log file and when it is changed, your application does something?

    How about this code....
  9. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    Hello Truffy,

    You said you normally use WinSCP to connect to the linux box. Does that mean you can connect via FTP?

    If so, you could try this code. You may need to edit it slightly.


    ...
  10. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    Why not login to the Linux box and launch the application from there?
  11. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    OK in that case your user has access to the path/file in question.

    Are you running this application in a Linux environment?

    If so, I'm thinking it could be something to do with the path String....
  12. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    Do you have access to this file before you run the Java program?
  13. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    Hello Truffy,

    Here is a simple example. It will read in a file called log.txt and print it's content to the console:



    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import...
  14. Replies
    36
    Views
    11,490

    Re: getting files in the linux server

    Hello Truffy,

    Do you know the location of the log files? What do you wish to do with the file once you have it?
Results 1 to 14 of 14